Skip to content

Latest commit

 

History

History
151 lines (123 loc) · 4.97 KB

ReferenceOfClasses.md

File metadata and controls

151 lines (123 loc) · 4.97 KB

You don't normaly create instances of any class but Github. You obtain instances through calls to get_ and create_ methods.

In this documentation:

  • login is a string containing a user's or organization's login
  • user is an instance of AuthenticatedUser or NamedUser
  • name is a string containing the name of a repository
  • repo is an instance of Repository

Class Github

  • Constructed from user's login and password
  • get_user(): AuthenticatedUser
  • get_user( login ): NamedUser
  • get_organization( login ): Organization

Class AuthenticatedUser

  • Attributes: see API
  • edit( ... ): see API for parameters

Repositories

  • get_repos(): list of Repository: see API for type parameter
  • get_repo( name ): Repository
  • create_repo( ... ): Repository: see API for parameters
  • create_fork( repo ): Repository

Watching

  • get_watched(): list of Repository
  • has_in_watched( repo ): bool
  • add_to_watched( repo )
  • remove_from_watched( repo )

Organizations

  • get_orgs() : list of Organization

Following

  • get_followers() : list of NamedUser
  • get_following() : list of NamedUser
  • has_in_following( user ): bool
  • add_to_following( user )
  • remove_from_following( user )

Class NamedUser

  • Attributes: see API

Repositories

  • get_repos(): list of Repository: see API for type parameter
  • get_repo( name ): Repository

Watching

  • get_watched(): list of Repository

Organizations

  • get_orgs() : list of Organization

Following

  • get_followers() : list of NamedUser
  • get_following() : list of NamedUser

Class Organization

  • Attributes: see API
  • edit( ... ): see API for parameters

Repositories

  • get_repos(): list of Repository: see API for type parameter
  • get_repo( name ): Repository
  • create_repo( ... ): Repository: see API for parameters
  • create_fork( repo ): Repository

Members

  • get_members(): list of NamedUser
  • has_in_members( user ): bool
  • remove_from_members( user )
  • get_public_members(): list of NamedUser
  • has_in_public_members( user ): bool
  • add_to_public_members( user )
  • remove_from_public_members( user )

Class Repository

  • Attributes: see API
  • edit( ... ): see API for parameters

Collaborators

  • get_collaborators(): list of NamedUser
  • has_in_collaborators( user ): bool
  • add_to_collaborators( user )
  • remove_from_collaborators( user )

Contributors

  • get_contributors(): list of NamedUser

Watching

  • get_watchers(): list of NamedUser

Forks

  • get_forks(): list of Repository

Git objects

  • get_git_refs(): list of GitRef
  • get_git_ref( ref ): GitRef
  • create_git_ref( ... ): GitRef: see API for parameters
  • get_git_blob( sha ): GitBlob
  • create_git_blob( ... ): GitBlob: see API for parameters (TODO SOON)
  • get_git_commit( sha ): GitCommit
  • create_git_commit( ... ): GitCommit: see API for parameters (TODO SOON)
  • get_git_tree( sha ): GitTree
  • create_git_tree( ... ): GitTree: see API for parameters (TODO SOON)
  • get_git_tag( sha ): GitTag
  • create_git_tag( ... ): GitTag: see API for parameters (TODO SOON)

Class GitRef

  • Attributes: see API
  • edit( ... ): see API for parameters (TODO SOON: edit GitRefs returned but get_git_refs or create_git_ref)

Class GitBlob

  • Attributes: see API (TODO SOON)

Class GitCommit

  • Attributes: see API (TODO SOON)

Class GitTree

  • Attributes: see API (TODO SOON)

Class GitTag

  • Attributes: see API (TODO SOON)