Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository Api #2

Open
zzarcon opened this issue Nov 10, 2015 · 2 comments
Open

Repository Api #2

zzarcon opened this issue Nov 10, 2015 · 2 comments
Labels

Comments

@zzarcon
Copy link
Member

zzarcon commented Nov 10, 2015

List repos of a user

GET /repos?user_id=zzarcon

{
   "repos": [
     {
       "id": 1,
       "name": "Focusable",
       "description": "Set a spotlight focus on DOM element adding a overlay layer to the rest of the page",
       "total_stars": 1000,
       "new_stars": 5,
       "last_time_checked": "01/08/2015 10:10:10"
     },
     {
       "id": 2,
       "name": "CADRACSwippableCell",
       "description": "Swippable CollectionView cells made with Reactive Cocoa",
       "total_stars": 150,
       "new_stars": 50,
       "last_time_checked": "01/08/2015 10:10:10"
     },
   ]
}

Watch a repo

POST /repos/:repo_id

{
   "status": "ok"
}
{
   "status": "fail"
}

Unwatch a repo

DELETE /repos/:repo_id

{
   "status": "ok"
}
{
   "status": "fail"
}
@zzarcon
Copy link
Member Author

zzarcon commented Nov 10, 2015

@joanromano Take a look at the proposal, if you like the format I can implemented now.

Regarding to the info of the repo, right now I will return just id, name, stars and description. But we can add more info later, it's a minor thing.

@joanromano
Copy link
Member

Why not having the same endpoint for both watch and unwatch? Also, we might need a "watching" flag in the repos endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants