Documentation
¶
Index ¶
- Constants
- func GetPaperIDFromPaperTitle(paperTitle string) string
- type Client
- func (c *Client) PaperGet(paperID string) (*models.PaperListResultItem, error)
- func (c *Client) PaperList(params PaperListParams) (*models.PaperListResult, error)
- func (c *Client) PaperMethodList(paperID string) (*models.MethodList, error)
- func (c *Client) PaperRepositoryList(paperID string) (*models.RepositoryList, error)
- func (c *Client) PaperResultList(paperID string) (*models.ResultList, error)
- func (c *Client) PaperTaskList(paperID string) (*models.TaskList, error)
- type ClientOption
- type PaperListParams
Examples ¶
Constants ¶
View Source
const (
BaseURL = "https://paperswithcode.com/api/v1"
)
Variables ¶
This section is empty.
Functions ¶
func GetPaperIDFromPaperTitle ¶ added in v0.3.0
Example ¶
paperTitle := "Generative Adversarial Networks" fmt.Println(GetPaperIDFromPaperTitle(paperTitle))
Output: generative-adversarial-networks
Types ¶
type Client ¶
type Client struct { BaseURL string HTTPClient *http.Client // contains filtered or unexported fields }
func (*Client) PaperGet ¶
func (c *Client) PaperGet(paperID string) (*models.PaperListResultItem, error)
PaperGet returns a single paper. Note that paperID is hyphen cased (e.g., generative-adversarial-networks).
func (*Client) PaperList ¶
func (c *Client) PaperList(params PaperListParams) (*models.PaperListResult, error)
func (*Client) PaperMethodList ¶ added in v0.3.0
func (c *Client) PaperMethodList(paperID string) (*models.MethodList, error)
func (*Client) PaperRepositoryList ¶ added in v0.3.0
func (c *Client) PaperRepositoryList(paperID string) (*models.RepositoryList, error)
func (*Client) PaperResultList ¶ added in v0.3.0
func (c *Client) PaperResultList(paperID string) (*models.ResultList, error)
type ClientOption ¶
type ClientOption func(*Client)
ClientOption can be used to swap the default http client or swap the API key
func WithAPIToken ¶
func WithAPIToken(apiToken string) ClientOption
WithAPIToken sets the client API token.
type PaperListParams ¶
func PaperListParamsDefault ¶
func PaperListParamsDefault() PaperListParams
func (PaperListParams) Build ¶
func (p PaperListParams) Build() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.