Documentation ¶
Overview ¶
Package angel provides functions for interacting with the AngelList API
Index ¶
- Constants
- Variables
- func GetQuery(endpoint_path string, keyVals map[string]string) ([]byte, error)
- func PostQuery(endpoint_path string, keyVals map[string]string) ([]byte, error)
- func Query(endpoint_path string, method int, keyVals map[string]string) (bts []byte, err error)
- func QueryUsersBatch(ids ...int64) (results interface{}, err error)
- type AngelClient
- func (c AngelClient) AuthorizeUri() string
- func (c AngelClient) Follow(id int64, id_type int) (result interface{}, err error)
- func (c AngelClient) GetUsersId(id int64, details string) (user AngelUser, err error)
- func (c AngelClient) QueryFollowsBatch(ids ...int64) (results interface{}, err error)
- func (c AngelClient) QueryStartupIdRoles(id int64, direction int) (startuproles []StartupRole, err error)
- func (c AngelClient) QueryStartupRoles(id int64, id_type int, v map[string]string) (startuproles []StartupRole, err error)
- func (c AngelClient) QueryStartupRolesDeprecated(id int64, id_type int) (startuproles []StartupRole, err error)
- func (c AngelClient) QueryStartupsBatch(ids ...int64) (startups []Startup, err error)
- func (c AngelClient) QueryStartupsFollowers(user_id int64) (users []AngelUser, err error)
- func (c AngelClient) QueryStartupsFollowersIds(user_id int64) (ids []int64, err error)
- func (c AngelClient) QueryStartupsId(startup_id int64) (startup Startup, err error)
- func (c AngelClient) QueryStartupsIdComments(startup_id int64) (comments []Comment, err error)
- func (c AngelClient) QueryStartupsIdUsers(startup_id int64) (users []AngelUser, err error)
- func (c AngelClient) QueryStartupsSearch(slug string) (startup Startup, err error)
- func (c AngelClient) QueryTagsStartups(startup_id int64, order int) (startups []Startup, err error)
- func (c AngelClient) QueryUsersFollowers(user_id int64) (users []AngelUser, err error)
- func (c AngelClient) QueryUsersFollowersIds(user_id int64) (ids []int64, err error)
- func (c AngelClient) QueryUsersFollowingStartups(user_id int64) (startups []Startup, err error)
- func (c AngelClient) QueryUsersFollowingStartupsIds(user_id int64) (ids []int64, err error)
- func (c AngelClient) QueryUsersFollowingUsers(user_id int64) (users []AngelUser, err error)
- func (c AngelClient) QueryUsersFollowingUsersIds(user_id int64) (ids []int64, err error)
- func (c AngelClient) RequestAccessToken(code string) (access_token string, err error)
- func (c AngelClient) Unfollow(id int64, id_type int) (result interface{}, err error)
- type AngelUser
- type Comment
- type IdsResponse
- type Location
- type Market
- type Startup
- type StartupRole
- type Tag
Constants ¶
const ( UserId = iota StartupId = iota )
const ( DIRECTION_INCOMING = iota DIRECTION_OUTGOING = iota )
const ( DESC = iota ASC = iota POPULARITY = iota )
const API_BASE = "https://api.angel.co/1"
Variables ¶
var SECONDS_PER_QUERY = time.Duration(10 * time.Second)
SECONDS_PER_QUERY sets the number of seconds that must elapse between queries By default, execute at most one query every ten seconds Set to 0 to turn off throttling
Functions ¶
func Query ¶
Query issues a query to the AngelList API Like GetQuery and PostQuery, this function exists for the convenience of the automatically-throttled queries
func QueryUsersBatch ¶
QueryUsersBatch queries /users/batch for up to 50 users at a time, given a comma-separated list of IDs
Types ¶
type AngelClient ¶
func (AngelClient) AuthorizeUri ¶
func (c AngelClient) AuthorizeUri() string
AuthorizeUri generates a URI which users should be redirected to in order to authorize the application
func (AngelClient) Follow ¶
func (c AngelClient) Follow(id int64, id_type int) (result interface{}, err error)
Follow issues a POST query to /follows to follow the user/startup with the specified id Will throw an error (400) if the client's user is already following the specified user/startup
func (AngelClient) GetUsersId ¶
func (c AngelClient) GetUsersId(id int64, details string) (user AngelUser, err error)
GetUsersId implements /users/:id
func (AngelClient) QueryFollowsBatch ¶
func (c AngelClient) QueryFollowsBatch(ids ...int64) (results interface{}, err error)
QueryFollowsBatch queries follows/batch for the followers of several users Returns the follower and followed information
func (AngelClient) QueryStartupIdRoles ¶
func (c AngelClient) QueryStartupIdRoles(id int64, direction int) (startuproles []StartupRole, err error)
QueryStartupIdRoles queries /startups/:id/roles
func (AngelClient) QueryStartupRoles ¶
func (c AngelClient) QueryStartupRoles(id int64, id_type int, v map[string]string) (startuproles []StartupRole, err error)
QueryStartupRoles queries the /startup_roles&v=1 endpoint for all startup roles associated with the user with the given id
func (AngelClient) QueryStartupRolesDeprecated ¶
func (c AngelClient) QueryStartupRolesDeprecated(id int64, id_type int) (startuproles []StartupRole, err error)
QueryStartupRoles queries the now-deprecated /startup_roles for all startup roles associated with the user with the given id
func (AngelClient) QueryStartupsBatch ¶
func (c AngelClient) QueryStartupsBatch(ids ...int64) (startups []Startup, err error)
Query /startups/batch for the followers of several users
func (AngelClient) QueryStartupsFollowers ¶
func (c AngelClient) QueryStartupsFollowers(user_id int64) (users []AngelUser, err error)
QueryStartupsFollowers queries /startups/:id/followers for a startup's followers
func (AngelClient) QueryStartupsFollowersIds ¶
func (c AngelClient) QueryStartupsFollowersIds(user_id int64) (ids []int64, err error)
QueryStartupsFollowersIds queries /startups/:id/followers/ids for a startup's followers
func (AngelClient) QueryStartupsId ¶
func (c AngelClient) QueryStartupsId(startup_id int64) (startup Startup, err error)
QueryStartupsId queries /startups/:id for a startup, given its id
func (AngelClient) QueryStartupsIdComments ¶
func (c AngelClient) QueryStartupsIdComments(startup_id int64) (comments []Comment, err error)
QueryStartupsIdComments queries /startups/:id/comments for a startup's comments, given its id
func (AngelClient) QueryStartupsIdUsers ¶
func (c AngelClient) QueryStartupsIdUsers(startup_id int64) (users []AngelUser, err error)
QueryStartupsIdUsers queries /startups/:id/users for a startup's tagged users, given its id
func (AngelClient) QueryStartupsSearch ¶
func (c AngelClient) QueryStartupsSearch(slug string) (startup Startup, err error)
Query /startups/search for the followers of several users TODO implement domain
func (AngelClient) QueryTagsStartups ¶
func (c AngelClient) QueryTagsStartups(startup_id int64, order int) (startups []Startup, err error)
Query /tags/:id/startups for startups tagged with the given tag or a child of the given tag TODO implement pagination
func (AngelClient) QueryUsersFollowers ¶
func (c AngelClient) QueryUsersFollowers(user_id int64) (users []AngelUser, err error)
QueryUsersFollowers queries /users/:id/followers for a user's followers
func (AngelClient) QueryUsersFollowersIds ¶
func (c AngelClient) QueryUsersFollowersIds(user_id int64) (ids []int64, err error)
QueryUsersFollowersIds queries /users/:id/followers/ids for a user's followers Returns ids only
func (AngelClient) QueryUsersFollowingStartups ¶
func (c AngelClient) QueryUsersFollowingStartups(user_id int64) (startups []Startup, err error)
QueryUsersFollowingStartups queries /users/:id/following for a user's followers (return startups only)
func (AngelClient) QueryUsersFollowingStartupsIds ¶
func (c AngelClient) QueryUsersFollowingStartupsIds(user_id int64) (ids []int64, err error)
QueryUsersFollowingStartupsIds queries /users/:id/following/ids for all startups that the given user is following (return startups only)
func (AngelClient) QueryUsersFollowingUsers ¶
func (c AngelClient) QueryUsersFollowingUsers(user_id int64) (users []AngelUser, err error)
QueryUsersFollowingUsers queries /users/:id/following for a user's followers (return users only)
func (AngelClient) QueryUsersFollowingUsersIds ¶
func (c AngelClient) QueryUsersFollowingUsersIds(user_id int64) (ids []int64, err error)
QueryUsersFollowingUsersIds queries /users/:id/following/ids for all users that the given user is following (return users only)
func (AngelClient) RequestAccessToken ¶
func (c AngelClient) RequestAccessToken(code string) (access_token string, err error)
RequestAccessToken exchanges the code from an OAuth callback for an access token
type AngelUser ¶
type AngelUser struct { Angellist_url *string Id int64 Name *string Roles []struct { Angellist_url *string Display_name *string Id int Name *string Tag_type *string } Linkedin_url *string Bio *string Twitter_url *string Follower_count float64 Image *string Facebook_url *string Locations []Location Investor bool Investor_details *struct { Startups_per_year string Average_amount string Accreditation string Markets []Market Investments []struct { Id int64 Name string Quality int } } }
func QueryUsers ¶
QueryUsers queries /users/:id for a user's information given an id
func QueryUsersSearch ¶
QueryUsersSearch queries /users/search for a user with the specified slug
func (AngelUser) MarketNames ¶
type IdsResponse ¶
type Startup ¶
type Startup struct { Id int64 //Id refers to the AngelList ID Name *string ",omitempty" Company_url *string ",omitempty" Angellist_url *string ",omitempty" StartupRoles *[]StartupRole //People associated with the startup Product_desc *string Community_profile bool Twitter_url *string Follower_count float64 //Markets []*Market //Locations []Location //Screenshots []*Screenshot Logo_url *string Blog_url *string Video_url *string Hidden bool Status *struct { Created_at *string Message *string } }
type StartupRole ¶
type StartupRole struct { Id int64 Confirmed bool User *struct { Follower_count int64 Image string Name string Id int64 Angellist_url string Bio string } Role string Created_at string Startup *struct { Id int64 Name string } Tagged struct { Type string Name string Id int64 Bio string Follower_count int64 Angellist_url string Image string } }
func QueryUsersStartups ¶
func QueryUsersStartups(id int64) ([]StartupRole, error)
QueryUsersStartups queries /users/:id/startups for a user's startup roles
type Tag ¶
type Tag struct { Angellist_url *string Statistics *struct { Direct *struct { Investor_followers float64 Users float64 Followers float64 Startups float64 } All *struct { Followers float64 Startups float64 Investor_followers float64 Users float64 } } Name *string Display_name *string Id float64 Tag_type *string }