forked from move-coop/parsons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub connector (move-coop#326)
* Add GitHub connector * GitHub connector review updates - Wraps GitHub 404 exception in custom Parsons error - Defaults to loading all list items unless a page is specified - Documentation and test updates
- Loading branch information
Showing
11 changed files
with
990 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
GitHub | ||
====== | ||
|
||
`GitHub <https://github.com>`_ is an online tool for software collaboration. | ||
|
||
.. note:: | ||
API Credentials | ||
- If you have a GitHub account you can use your normal username and password to authenticate with the API. | ||
- You can also use `a personal access token <https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token>`_. | ||
|
||
********** | ||
Quickstart | ||
********** | ||
|
||
**Get repo data** | ||
|
||
.. code-block:: python | ||
from parsons import GitHub | ||
github = GitHub() | ||
# Get repo by its full name (account/name) | ||
parsons_repo = github.get_repo("move-coop/parsons") | ||
**Get repo issues in a ``Table``** | ||
|
||
.. code-block:: python | ||
from parsons import GitHub | ||
github = GitHub() | ||
# Get the first page of a repo's issues as a Table | ||
parsons_issues_table = github.list_repo_issues("move-coop/parsons") | ||
**Download the contents of a repo file** | ||
|
||
.. code-block:: python | ||
from parsons import GitHub | ||
github = GitHub() | ||
# Download Parsons README.md to local "/tmp/README.md" | ||
parsons_readme_path = github.download_file("move-coop/parsons", "README.md", local_path="/tmp/README.md") | ||
=== | ||
API | ||
=== | ||
.. autoclass:: parsons.GitHub | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,7 @@ Indices and tables | |
databases | ||
facebook_ads | ||
freshdesk | ||
github | ||
hustle | ||
mailchimp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from parsons.github.github import GitHub | ||
|
||
__all__ = [ | ||
'GitHub' | ||
] |
Oops, something went wrong.