Fellow Class
A fellow with similarties to other people
Constructor
Fellow
()
Item Index
Methods
- add static
- authorsRepository
- authorsRepository static
- contributesRepository
- contributesRepository static
- create static
- ensure static
- ensureRepository
- get static
- maintainsRepository
- maintainsRepository static
Properties
- authoredRepositories
- contributedRepositories
- ensureFields static
- fellow A string in the format of "Benjamin Lupton <b@lupton.cc> (https://balupton.com)" or an object with properties
- githubUrl
- githubUsername
- homepage
- list static
- maintainedRepositories
- name
- url
- value The value used to set the properties of the fellow, forwarded to setValue
- years
Methods
add
-
value
Add a fellow or a series of people, denoted by the value, to the singleton list
Parameters:
-
valueMixedThe fellow or people to add
Returns:
An array of the fellow objects for the passed people
contributesRepository
-
slug
Make note that this fellow contributes to this repository slug
Parameters:
-
slugStringThe github repository slug that this user contributes to
contributesRepository
-
repoSlug
Get all fellows who contribute to a particular repository
Parameters:
-
repoSlugStringThe repository slug
Returns:
An array of the fellow objects that contribute to the repository
create
-
value
Create a new Fellow instance with the value, however if the value is already a fellow instance, then just return it
Parameters:
-
valueMixed
Returns:
The new fellow instance
ensure
-
value
With the value, see if an existing fellow exists in our singleton list property with the value, otherwise create a new fellow instance with the value and add them to our singleton list
Parameters:
-
valueMixedThe value to create a new fellow instance or find the existing fellow instance with
Returns:
The new or existing fellow instance
ensureRepository
-
slug
Ensures that the github repository exists on the class
Parameters:
-
slugStringGithub repository slug (e.g. "bevry/projectz")
Returns:
The repository object
get
-
value
Get a fellow from the singleton list
Parameters:
-
valueMixedThe value to fetch the value with
Returns:
The fetched fellow, if they exist with that value
maintainsRepository
-
slug
Make note that this fellow maintains this repository slug
Parameters:
-
slugStringThe github repository slug that this user maintains
Properties
ensureFields
Array
protected
static
An array of fields that will denote if the user is the same user or not when using ensure
fellow A string in the format of "Benjamin Lupton <b@lupton.cc> (https://balupton.com)" or an object with properties
String | Object
Update our fellow with the passed value
list
Unknown
static
A singleton array attached to the class object that stores it's people objects
name
String
If the name is empty, we will try to fallback to githubUsername then twitterUsername
If the name is prefixed with a series of numbers, that is considered the year
E.g. In 2015+ Bevry Pty Ltd then 2015+ is the years
E.g. In 2013-2015 Bevry Pty Ltd then 2013-2015 is the years
url
String
When set, will determine if it is a github, facebook, or twitter url
If it is, then it will extract the username and url from it
If this is not one of those urls, then it will set the homepage variable
When fetching, it will fetch homepage || githubUrl || facebookUrl || twitterUrl || null
value The value used to set the properties of the fellow, forwarded to setValue
Mixed
Construct our fellow instance with the value
