Documentation
¶
Index ¶
- type APICallMeta
- type Anchor
- type Backlink
- type Client
- func (c *Client) FetchAnchors(ctx context.Context, domain string, limit int) ([]Anchor, *APICallMeta, error)
- func (c *Client) FetchBacklinks(ctx context.Context, domain string, limit int) ([]Backlink, *APICallMeta, error)
- func (c *Client) FetchRankings(ctx context.Context, domain, base string, limit, offset int) ([]Ranking, *APICallMeta, error)
- func (c *Client) FetchRefDomains(ctx context.Context, domain string, limit int) ([]RefDomain, *APICallMeta, error)
- func (c *Client) FetchTopPages(ctx context.Context, domain string, limit int) ([]TopPage, *APICallMeta, error)
- func (c *Client) FetchVisibilityHistory(ctx context.Context, domain, base string) ([]VisibilityPoint, *APICallMeta, error)
- func (c *Client) GetDomainMetrics(ctx context.Context, domain string) (*DomainMetrics, *APICallMeta, error)
- type DomainMetrics
- type Ranking
- type RefDomain
- type TopPage
- type TopicalTF
- type VisibilityPoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICallMeta ¶
type APICallMeta struct {
Endpoint string
Method string
StatusCode uint16
DurationMs uint32
ResponseBody string // truncated to 10KB
}
APICallMeta captures metadata about an API call for logging.
type Backlink ¶
type Backlink struct {
SourceURL string `json:"source_url"`
TargetURL string `json:"target_url"`
AnchorText string `json:"anchor"`
SourceDomain string `json:"source_domain"`
LinkType string `json:"type"`
TrustFlow float64 `json:"trust_flow"`
CitationFlow float64 `json:"citation_flow"`
SourceTTFTopic string `json:"source_ttf_topic"`
Nofollow bool `json:"nofollow"`
FirstSeen string `json:"first_seen"`
LastSeen string `json:"last_seen"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client for the SEObserver API.
func (*Client) FetchAnchors ¶
func (c *Client) FetchAnchors(ctx context.Context, domain string, limit int) ([]Anchor, *APICallMeta, error)
FetchAnchors fetches anchor text distribution via backlinks/anchors.json.
func (*Client) FetchBacklinks ¶
func (c *Client) FetchBacklinks(ctx context.Context, domain string, limit int) ([]Backlink, *APICallMeta, error)
FetchBacklinks fetches top backlinks via backlinks/top.json.
func (*Client) FetchRankings ¶
func (c *Client) FetchRankings(ctx context.Context, domain, base string, limit, offset int) ([]Ranking, *APICallMeta, error)
FetchRankings fetches organic keyword rankings via organic_keywords/index.json.
func (*Client) FetchRefDomains ¶
func (c *Client) FetchRefDomains(ctx context.Context, domain string, limit int) ([]RefDomain, *APICallMeta, error)
FetchRefDomains fetches referring domains via backlinks/refdomains.json.
func (*Client) FetchTopPages ¶
func (c *Client) FetchTopPages(ctx context.Context, domain string, limit int) ([]TopPage, *APICallMeta, error)
FetchTopPages fetches top pages with Majestic authority data via backlinks/pages.json.
func (*Client) FetchVisibilityHistory ¶
func (c *Client) FetchVisibilityHistory(ctx context.Context, domain, base string) ([]VisibilityPoint, *APICallMeta, error)
FetchVisibilityHistory fetches organic visibility history.
func (*Client) GetDomainMetrics ¶
func (c *Client) GetDomainMetrics(ctx context.Context, domain string) (*DomainMetrics, *APICallMeta, error)
GetDomainMetrics fetches domain-level metrics via backlinks/metrics.json.
type DomainMetrics ¶
type TopPage ¶
type TopPage struct {
URL string `json:"url"`
Title string `json:"title"`
TrustFlow uint8 `json:"trust_flow"`
CitationFlow uint8 `json:"citation_flow"`
ExtBackLinks int64 `json:"ext_backlinks"`
RefDomains int64 `json:"ref_domains"`
OutLinks int64 `json:"out_links"`
TopicalTrustFlow []TopicalTF `json:"topical_trust_flow"`
Language string `json:"language"`
LastCrawlResult string `json:"last_crawl_result"`
LastCrawlDate string `json:"last_crawl_date"`
}
TopPage represents a top page with Majestic authority metrics.
func ParseRawTopPage ¶ added in v0.6.0
ParseRawTopPage parses a single raw top page from the flexible API response. The API returns mixed types: TTF values can be int or empty string, OutLinks is a string.