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

typos #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions GithubAPI.package/Github.class/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
I am a connection to github, providing methods to login and call requests on it. I implement behind Github's REST API v3. You can find details on it in here:
I am a connection to Github, providing methods to login and call requests on it. I am implemented using Github's REST API v3. You can find details on it in here:

https://developer.github.com/

# Setting up a connection and login

A new connection to github can be set up by doing:
A new connection to Github can be set up by doing:

connection := Github new.

Expand All @@ -28,7 +28,7 @@ The protocol *requests* contains several already implemented requests such as:
- get the pull requests of a given project
- get the issues of a given project
- get a user
- get the respositories of a suser
- get the repositories of a suser
- get the organizations of a user

All these request methods answer a GHResponse object. A GHResponse object contains inside the HTTP response plus some handy methods to parse the data and manage pagination. See the comment on GHResponse for more details.
Expand All @@ -39,10 +39,10 @@ Moreover, if something fails in the request, and a failed response is obtained,

# Paginated requests

By default all github requests are paginated with a max page number. For example, at the time of writing this comment, such max number was 30. To help accessing such paginated data, Github provides some meta-data links to the next, previous, last and first pages. This is specified in the following url:
By default all github requests are paginated with a max page number. For example, at the time of writing this comment, such max number was 30. To help accessing such paginated data, Github provides some meta-data links to the next, previous, last and first pages. This is specified in the following url:

https://developer.github.com/v3/#pagination

This implementation provides two ways of interacting with such paginated data. First, the GHResponse object returned by #call: provides access to the links and some helper methods such as #next and #hasNext. Check the comment in GHResponse for more information about this.

Moreover, the method #iterateOn: returns an iterator on a request. An iterator provides a high level API to access, select and collect data obtained from a paginated request, hiding the details of the page iteration behind. For more detailed information about this, check the GHRequestIterator class comment.
Moreover, the method #iterateOn: returns an iterator on a request. An iterator provides a high level API to access, select and collect data obtained from a paginated request, hiding the details of the page iteration behind. For more detailed information about this, check the GHRequestIterator class comment.