angellist

package
v0.0.0-...-854dcad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2013 The go-angellist AUTHORS. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2013 The go-angellist AUTHORS. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2013 The go-angellist AUTHORS. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2013 The go-angellist AUTHORS. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Returned if the specified resource does not exist.
	ErrNotFound = errors.New("Not Found")

	// Returned if the caller attempts to make a call or modify a resource
	// for which the caller is not authorized.
	//
	// The request was a valid request, the caller's authentication credentials
	// succeeded but those credentials do not grant the caller permission to
	// access the resource.
	ErrForbidden = errors.New("Forbidden")

	// Returned if the call requires authentication and either the credentials
	// provided failed or no credentials were provided.
	ErrNotAuthorized = errors.New("Unauthorized")

	// Returned if the caller submits a badly formed request. For example,
	// the caller can receive this return if you forget a required parameter.
	ErrBadRequest = errors.New("Bad Request")
)
View Source
var DefaultClient = http.DefaultClient

DefaultClient uses DefaultTransport, and is used internall to execute all http.Requests. This may be overriden for unit testing purposes.

IMPORTANT: this is not thread safe and should not be touched with the exception overriding for mock unit testing.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token string

	Users    *UserResource
	Startups *StartupResource
}

func New

func New(token string) *Client

New creates an instance of the AngelList Client

func NewGuest

func NewGuest() *Client

New creates an instance of the AngelList Client using a Guest / Anonymous account.

type Comment

type Comment struct {
	Id      int        `json:"id"`
	Comment string     `json:"comment"`
	Created *time.Time `json:"created_at"`
	User    *User      `json:"user"`
}

type CompanyType

type CompanyType struct {
	Id      int    `json:"id"`
	Type    string `json:"tag_type"`
	Name    string `json:"name"`
	Display string `json:"display_name"`
	Url     string `json:"angellist_url"`
}

type Investment

type Investment struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Quality int    `json:"quality"`
}

type InvestorDetail

type InvestorDetail struct {
	Accreditation   string `json:"accreditation"`
	StartupsPerYear string `json:"startups_per_year"`
	AverageAmount   string `json:"average_amount"`

	// Child collections
	Locations   []*Location   `json:"locations"`
	Investments []*Investment `json:"investments"`
	Markets     []*Market     `json:"markets"`
}

type Location

type Location struct {
	Id      int    `json:"id"`
	Type    string `json:"tag_type"`
	Name    string `json:"name"`
	Display string `json:"display_name"`
	Url     string `json:"angellist_url"`
}

type Market

type Market struct {
	Id      int    `json:"id"`
	Type    string `json:"tag_type"`
	Name    string `json:"name"`
	Display string `json:"display_name"`
	Url     string `json:"angellist_url"`
}

type Role

type Role struct {
	Id      int    `json:"id"`
	Type    string `json:"tag_type"`
	Name    string `json:"name"`
	Display string `json:"display_name"`
	Url     string `json:"angellist_url"`
}

type Screenshot

type Screenshot struct {
	Thumbnail string `json:"thumb"`
	Original  string `json:"original"`
}

type Skill

type Skill struct {
	Id      int    `json:"id"`
	Type    string `json:"tag_type"`
	Name    string `json:"name"`
	Display string `json:"display_name"`
	Url     string `json:"angellist_url"`
}

type Startup

type Startup struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	Desc      string `json:"product_desc"`
	Concept   string `json:"high_concept"`
	Website   string `json:"company_url"`
	Followers int    `json:"follower_count"`
	Hidden    bool   `json:"hidden"`

	// associated media URLs
	Thumb string `json:"thumb_url"`
	Video string `json:"video_url"`

	// community_profile is true if the company's
	// profile was automatically generated and has not
	// been 'claimed' by anyone at the company.
	CommunityProfile bool `json:"community_profile"`

	// quality is an integer between 0 and 10, calculated
	// every 48 hours, and reflects the company's rank on
	// AngelList. Higher numbers mean better quality.
	Quality int `json:"quality"`

	Created *time.Time `json:"created_at"` // format "2011-03-18T00:24:29Z"
	Updated *time.Time `json:"updated_at"`

	// Links to social websites where the
	// user has a professional presence.
	Blog       string `json:"blog_url"`
	Twitter    string `json:"twitter_url"`
	AngelList  string `json:"angellist_url"`
	Crunchbase string `json:"crunchbase_url"`

	Screenshots []*Screenshot  `json:"screenshots"`
	CompanyType []*CompanyType `json:"company_type"`
	Locations   []*Location    `json:"locations"`
	Markets     []*Market      `json:"markets"`
}

type StartupResource

type StartupResource struct {
	// contains filtered or unexported fields
}

func (*StartupResource) Get

func (s *StartupResource) Get(id int) (*Startup, error)

Get a company's information given an id. see http://goo.gl/ktfUI5

func (*StartupResource) GetComments

func (s *StartupResource) GetComments(id int) ([]*Comment, error)

Returns the comments on the given company. see http://goo.gl/NLTiRX

type User

type User struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	Bio       string `json:"bio"`
	Image     string `json:"image"`
	Followers int    `json:"follower_count"`
	Investor  bool   `json:"investor"`

	// Links to social websites where the
	// user has a professional presence.
	Blog      string `json:"blog_url"`
	OnlineBio string `json:"online_bio_url"`
	AngelList string `json:"angellist_url"`
	Twitter   string `json:"twitter_url"`
	Facebook  string `json:"facebook_url"`
	LinkedIn  string `json:"linkedin_url"`
	AboutMe   string `json:"aboutme_url"`
	GitHub    string `json:"github_url"`
	Dribbble  string `json:"dribbble_url"`
	Behance   string `json:"behance_url"`

	// Child collections
	Locations []*Location `json:"locations"`
	Roles     []*Role     `json:"roles"`
	Skills    []*Skill    `json:"skills"`

	// Optional Investor Detail
	InvestorDetail *InvestorDetail `json:"investor_details"`
}

type UserResource

type UserResource struct {
	// contains filtered or unexported fields
}

func (*UserResource) Get

func (u *UserResource) Get(id int) (*User, error)

Get a user's information given an id.

func (*UserResource) GetEmail

func (u *UserResource) GetEmail(email string) (*User, error)

Search for a user given an MD5 email hash.

func (*UserResource) GetMulti

func (u *UserResource) GetMulti(ids ...int) ([]*User, error)

Get a user's information given an id.

func (*UserResource) GetSlug

func (u *UserResource) GetSlug(slug string) (*User, error)

Search for a user given a URL slug.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL