Documentation
¶
Overview ¶
This is the package that provides functions to scrape information from cypherhunter.com pages
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInvestorsAll ¶
GetInvestorsAll gives list of all investors from coin page given by Request() of Requester interface.
Returns array of string with investor names and possibly nil error
Types ¶
type CoinRequester ¶ added in v1.1.1
type CoinRequester struct {
// contains filtered or unexported fields
}
CoinRequester is the struct containing coinUrl to be requested
func NewCoinRequester ¶ added in v1.1.1
func NewCoinRequester(coinUrl string) (CoinRequester, error)
NewCoinRequester gives new value of type CoinRequester. Before creating CoinRequester checks if input url is valid cypherhunter.com url.
Returns new CoinRequester with url and nil error if url is valid else empty CoinRequester and error
Example ¶
rawUrl := " https://www.cypherhunter.com/en/p/solana/ "
cr, err := NewCoinRequester(rawUrl)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v", cr)
Output: cypherhunterscrapper.CoinRequester{coinUrl:"https://www.cypherhunter.com/en/p/solana/"}
func (CoinRequester) Request ¶ added in v1.1.1
func (c CoinRequester) Request() (string, error)
Implements function Request() of Requester interface
type Investor ¶ added in v1.0.3
Investor is how the cypherhunterscrapper package stores an information about the investor
func GetInvestorsExceptional ¶ added in v1.1.0
GetInvestorsExceptional finds top investors in list of investors names.
Returns possibly empty list of top investors of type Investor
func InListOfTop ¶ added in v1.1.0
InListOfTop gives Investor if passed name is in list of top investors. Is preferred to be used in Comma Ok Idiom.
Returns Investor and bool meaning that the name is on the list of top investors
Example ¶
name := "Polychain Capital"
investor, ok := InListOfTop(name)
if ok {
fmt.Printf("%#v", investor)
}
Output: cypherhunterscrapper.Investor{Name:"Polychain Capital", Link:"https://www.cypherhunter.com/en/p/polychain-capital/", Tier:"Premier", TierId:0}