Global Function
ifFollow(yourUsername, yourToken) → {IfFollow}
Creates an instance of the IfFollow module.
Parameters:
Name | Type | Description |
---|---|---|
yourUsername |
string | Your GitHub username. |
yourToken |
string | Your GitHub personal access token. |
- Source:
Returns:
An object containing functions to interact with followers and
followings.
- Type
- IfFollow
Methods
isFollower(username) → {Promise.<string>}
Checks if a user is following the authenticated user.
Parameters:
Name | Type | Description |
---|---|---|
username |
string | The username to check. |
- Source:
Returns:
A message indicating if the user follows or not.
- Type
- Promise.<string>
isFollowing(username) → {Promise.<string>}
Checks if the authenticated user is following a given user.
Parameters:
Name | Type | Description |
---|---|---|
username |
string | The username to check. |
- Source:
Returns:
A message indicating if the user is followed or not.
- Type
- Promise.<string>
isFollowingBack(username) → {Promise.<string>}
Checks if a user is following the authenticated user back.
Parameters:
Name | Type | Description |
---|---|---|
username |
string | The username to check. |
- Source:
Returns:
A message indicating if the user is following back or not.
- Type
- Promise.<string>
totalFollowers() → {Promise.<number>}
Retrieves the total number of followers for the authenticated user.
- Source:
Returns:
The total number of followers.
- Type
- Promise.<number>
totalFollowings() → {Promise.<number>}
Retrieves the total number of users that the authenticated user is
following.
- Source:
Returns:
The total number of followings.
- Type
- Promise.<number>
(async) unfollowAllNotFollowingBack() → {Promise.<void>}
Unfollows all users who are not following back.
- Source:
Returns:
A promise that resolves once all users are unfollowed.
- Type
- Promise.<void>
(async) unfollowNotFollowingBack(username) → {Promise.<void>}
Unfollows a user who is not following back.
Parameters:
Name | Type | Description |
---|---|---|
username |
string | The username of the user to unfollow if not following back. |
- Source:
Returns:
A promise that resolves once the user is unfollowed.
- Type
- Promise.<void>
whoFollowingBack() → {Promise.<Array.<string>>}
Retrieves users that the authenticated user is following back.
- Source:
Returns:
An array of usernames being followed back.
- Type
- Promise.<Array.<string>>
whoNotFollowingBack() → {Promise.<Array.<string>>}
Retrieves users that the authenticated user is not following back.
- Source:
Returns:
An array of usernames not followed back.
- Type
- Promise.<Array.<string>>
Type Definitions
IfFollow
Module for managing followers and followings on GitHub.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
isFollower |
function | Checks if a user is following the authenticated user. |
isFollowing |
function | Checks if the authenticated user is following a given user. |
totalFollowers |
function | Retrieves the total number of followers for the authenticated user. |
totalFollowings |
function | Retrieves the total number of users that the authenticated user is following. |
whoNotFollowingBack |
function | Retrieves users that the authenticated user is not following back. |
whoFollowingBack |
function | Retrieves users that the authenticated user is following back. |
isFollowingBack |
function | Checks if a user is following the authenticated user back. |
unfollowNotFollowingBack |
function | Unfollows a user who is not following back. |
unfollowAllNotFollowingBack |
function | Unfollows all users who are not following back. |
- Source: