Legacy

This part of the documentation covers the legacy objects used in the Search section of the API.

Legacy Objects

class github3.legacy.LegacyIssue(issue, session=None)

The LegacyIssue object. This object is only every used in conjuction with the search_issues. Unfortunately, GitHub hasn’t updated the search functionality to use the objects as they exist now.

See also: http://developer.github.com/v3/search/#search-issues

body = None

Body of the issue

comments = None

Number of comments on the issue

created_at = None

datetime object representing the creation of the issue

classmethod from_json(json)

Return an instance of cls formed from json.

gravatar_id = None

id of the gravatar account

html_url = None

URL of the issue

labels = None

list of labels applied to this issue

number = None

Issue number

position = None

Position

ratelimit_remaining

Number of requests before GitHub imposes a ratelimit.

Returns:int
refresh(conditional=False)

Re-retrieve the information for this object and returns the refreshed instance.

Parameters:conditional (bool) – If True, then we will search for a stored header (‘Last-Modified’, or ‘ETag’) on the object and send that as described in the Conditional Requests section of the docs
Returns:self

The reasoning for the return value is the following example:

repos = [r.refresh() for r in g.iter_repos('kennethreitz')]

Without the return value, that would be an array of None‘s and you would otherwise have to do:

repos = [r for i in g.iter_repos('kennethreitz')]
[r.refresh() for r in repos]

Which is really an anti-pattern.

Changed in version 0.5.

state = None

State of the issue, i.e., open or closed

title = None

Title of the issue

to_json()

Return the json representing this object.

updated_at = None

datetime object representing the last time the issue was updated

user = None

User’s login

votes = None

Number of votes on this issue. Probably effectively deprecated


class github3.legacy.LegacyRepo(repo, session=None)

The LegacyRepo object. This wraps data returned using the search_repos

See also: http://developer.github.com/v3/search/#search-repositories

created = None

datetime object representing the date of creation of this repo

created_at = None

datetime object representing the date of creation of this repo

description = None

description of this repository

followers = None

Number of followers

forks = None

Number of forks of this repository

classmethod from_json(json)

Return an instance of cls formed from json.

has_downloads = None

Boolean - whether the repository has downloads or not

has_issues = None

Boolean - whether the repository has issues or not

has_wiki = None

Boolean - whether the repository has a wiki or not

homepage = None

URL of the website for this repository

is_private()

Checks if this repository is private

language = None

Language used in this repository

name = None

Name of this repository

open_issues = None

Number of open issues

owner = None

Owner of this repository

private = None

Whether the repository is private or not

pushed = None

datetime object representing the last time the repo was pushed to

pushed_at = None

datetime object representing the last time the repo was pushed to

ratelimit_remaining

Number of requests before GitHub imposes a ratelimit.

Returns:int
refresh(conditional=False)

Re-retrieve the information for this object and returns the refreshed instance.

Parameters:conditional (bool) – If True, then we will search for a stored header (‘Last-Modified’, or ‘ETag’) on the object and send that as described in the Conditional Requests section of the docs
Returns:self

The reasoning for the return value is the following example:

repos = [r.refresh() for r in g.iter_repos('kennethreitz')]

Without the return value, that would be an array of None‘s and you would otherwise have to do:

repos = [r for i in g.iter_repos('kennethreitz')]
[r.refresh() for r in repos]

Which is really an anti-pattern.

Changed in version 0.5.

score = None

Score

size = None

Size of the repo

to_json()

Return the json representing this object.

type = None

Type of object

url = None

URL of the project on GitHub

user = None

User’s login

watchers = None

Number of people watching this project


class github3.legacy.LegacyUser(user, session=None)

The LegacyUser object. This handles information returned by search_users.

See also: http://developer.github.com/v3/search/#search-users and http://developer.github.com/v3/search/#email-search

created = None

datetime object representing when the account was created

created_at = None

datetime object representing when the account was created

followers = None

Number of followers

followers_count = None

Number of followers

classmethod from_json(json)

Return an instance of cls formed from json.

fullname = None

Full name of this user

gravatar_id = None

Gravatar id for this user

id = None

Unique id of this user

language = None

Language

location = None

Location of this user

login = None

username for the user

name = None

Full name of this user

public_repo_count = None

Number of public repos owned by this user

ratelimit_remaining

Number of requests before GitHub imposes a ratelimit.

Returns:int
refresh(conditional=False)

Re-retrieve the information for this object and returns the refreshed instance.

Parameters:conditional (bool) – If True, then we will search for a stored header (‘Last-Modified’, or ‘ETag’) on the object and send that as described in the Conditional Requests section of the docs
Returns:self

The reasoning for the return value is the following example:

repos = [r.refresh() for r in g.iter_repos('kennethreitz')]

Without the return value, that would be an array of None‘s and you would otherwise have to do:

repos = [r for i in g.iter_repos('kennethreitz')]
[r.refresh() for r in repos]

Which is really an anti-pattern.

Changed in version 0.5.

repos = None

Number of repos owned by the user

score = None

Score

to_json()

Return the json representing this object.

type = None

Type of user

username = None

User’s login

Table Of Contents

Previous topic

Issue

Next topic

Models

This Page