mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Doc
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
Object:
|
||||
- GET-able or not: lazy on attribute reading
|
||||
- PATCH-able or not: object.edit( ... )
|
||||
- DELETE-able or not: object.delete()
|
||||
- has attributes
|
||||
- scalars (in the GET for the object)
|
||||
- lists (in a specific GET)
|
||||
- GET-able or not: lazy on attribute reading
|
||||
- PATCH-able or not: object.edit( ... )
|
||||
- DELETE-able or not: object.delete()
|
||||
- has attributes
|
||||
- scalars (in the GET for the object)
|
||||
- lists (in a specific GET)
|
||||
|
||||
Scalar:
|
||||
- fondamental type or objet
|
||||
- fondamental type or objet
|
||||
|
||||
List:
|
||||
- contains fondamental type or objet
|
||||
- GET-able or not
|
||||
- elements GET-able or not
|
||||
- to ask if an element is in the list
|
||||
- elements PUT-able or not
|
||||
- add an existing element to the list: parent.add_to_elements( element )
|
||||
- POST-able or not
|
||||
- create a new element and add it to the list: parent.create_element( ... )
|
||||
- elements DELETE-able or not
|
||||
- delete an element from a list can have two meanings:
|
||||
- the element's life is finished: element.delete()
|
||||
- the element is just removed from the list, but continues to live somewhere else: parent.remove_from_elements( element )
|
||||
- contains fondamental type or objet
|
||||
- GET-able or not
|
||||
- elements GET-able or not
|
||||
- to ask if an element is in the list
|
||||
- elements PUT-able or not
|
||||
- add an existing element to the list: parent.add_to_elements( element )
|
||||
- POST-able or not
|
||||
- create a new element and add it to the list: parent.create_element( ... )
|
||||
- elements DELETE-able or not
|
||||
- delete an element from a list can have two meanings:
|
||||
- the element's life is finished: element.delete()
|
||||
- the element is just removed from the list, but continues to live somewhere else: parent.remove_from_elements( element )
|
||||
|
||||
@@ -11,52 +11,6 @@ First create a Gihub instance:
|
||||
|
||||
Then play with your Github objects:
|
||||
|
||||
for repository in g.user().repositories( type = "private" ):
|
||||
for repository in g.user().get_repositories():
|
||||
print repository.name
|
||||
repository.edit( has_wiki = False )
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
Here are the classes encapsulating the API. You can use them without knowing the API itself.
|
||||
If you know what API you need to call, see file Reference.md to understand which class(es) impements it.
|
||||
|
||||
User
|
||||
----
|
||||
|
||||
If `g` is a `Gihub`:
|
||||
|
||||
- `g.user()` returns the authenticated `User`
|
||||
- `g.user( name )` returns the named `User`
|
||||
|
||||
If `user` is a `User`:
|
||||
|
||||
- cf. paragraph Organizations to access its organizations
|
||||
- cf. paragraph Repositories to access its repositories
|
||||
|
||||
Organizations
|
||||
-------------
|
||||
|
||||
If `g` is a `Gihub`:
|
||||
- `g.organization( name )` returns the named `Organization`
|
||||
|
||||
If `user` is a `User`:
|
||||
|
||||
- user.organizations() lists its `Organization`s
|
||||
|
||||
If `org` is an `Organization`:
|
||||
|
||||
- cf. paragraph Repositories to access its repositories
|
||||
|
||||
Repositories
|
||||
------------
|
||||
|
||||
If `owner` is a `User` or an `Organization`:
|
||||
|
||||
- `owner.repositories( type )` lists its `Repository`ies
|
||||
- `owner.repository( name )` returns the named `Repository`
|
||||
- `owner.createRepository( name )` creates a new repository and returns the new `Repository`
|
||||
|
||||
If `repo` is a `Repository`:
|
||||
|
||||
- `repo.edit()` edits the repository (same optional arguments as [API](http://developer.github.com/v3/repos/#edit))
|
||||
|
||||
Reference in New Issue
Block a user