{"modulePath":"github.com/google/go-github/scrape","version":"v0.0.0-20261201193712-db78161018b0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package scrape\n\nPackage scrape provides a client for interacting with GitHub using screen scraping.\n\nThis is intended to be used as a supplement to the standard go-github library to access data that is not currently exposed by either the official REST or GraphQL APIs.\n\nBecause of the nature of screen scraping, this package should be treated as HIGHLY EXPERIMENTAL, and potentially unstable. We make no promises relating to compatibility or stability of the exported API. Even though this package is distributed as part of the go-github library, it is explicitly exempt from any stability promises that my be implied by the library version number.\n\n## Types\n\n```go\ntype AppManifest struct {\n\t// The name of the GitHub App.\n\tName *string `json:\"name,omitempty\"`\n\t// Required. The homepage of your GitHub App.\n\tURL *string `json:\"url,omitempty\"`\n\t// The full URL(s) of the endpoint(s) to authenticate users via the GitHub App (Max: 10).\n\tCallbackURLs []string `json:\"callback_urls,omitempty\"`\n\t// Required. The configuration of the GitHub App's webhook.\n\tHookAttributes map[string]string `json:\"hook_attributes,omitempty\"`\n\t// The full URL to redirect to after the person installs the GitHub App.\n\tRedirectURL *string `json:\"redirect_url,omitempty\"`\n\t// A description of the GitHub App.\n\tDescription *string `json:\"description,omitempty\"`\n\t// Set to true when your GitHub App is available to the public or false when\n\t// it is only accessible to the owner of the app.\n\tPublic *bool `json:\"public,omitempty\"`\n\t// The list of events the GitHub App subscribes to.\n\tDefaultEvents []string `json:\"default_events,omitempty\"`\n\t// The set of permissions needed by the GitHub App.\n\tDefaultPermissions *github.InstallationPermissions `json:\"default_permissions,omitempty\"`\n}\n```\nAppManifest represents a GitHub App manifest, used for preconfiguring GitHub App configuration. c.f. [https://docs.github.com/en/apps/sharing-github-apps/registering-a-github-app-from-a-manifest](https://docs.github.com/en/apps/sharing-github-apps/registering-a-github-app-from-a-manifest)\n\n```go\ntype Client struct {\n\t*http.Client\n\t// contains filtered or unexported fields\n}\n```\nClient is a GitHub scraping client.\n\n```go\nfunc NewClient(transport http.RoundTripper) *Client\n```\nNewClient constructs a new Client.  If transport is nil, a default transport is used.\n\n```go\nfunc (c *Client) AppRestrictionsEnabled(org string) (bool, error)\n```\nAppRestrictionsEnabled returns whether the specified organization has restricted third-party application access.\n\n```go\nfunc (c *Client) Authenticate(username, password, otpseed string) error\n```\nAuthenticate client to GitHub with the provided username, password, and if two-factor auth is enabled for the account, otpseed.\n\notpseed is the OTP Secret provided from GitHub as part of two-factor application enrollment.  When registering the application, click the \"enter this text code\" link on the QR Code page to see the raw OTP Secret.\n\n```go\nfunc (c *Client) CreateApp(m *AppManifest, orgName string) (*http.Response, error)\n```\nCreateApp creates a new GitHub App with the given manifest configuration. orgName is optional, and if provided, the App will be created within the specified organization.\n\n```go\nfunc (c *Client) ListOAuthApps(org string) ([]*OAuthApp, error)\n```\nListOAuthApps lists the reviewed OAuth Applications for the specified organization (whether approved or denied).\n\n```go\nfunc (c *Client) LoadCookies(v []byte) error\n```\nLoadCookies loads the provided cookies for github.com.\n\n```go\nfunc (c *Client) OrgPaymentInformation(org string) (PaymentInformation, error)\n```\nOrgPaymentInformation returns payment information for the specified org.\n\n```go\nfunc (c *Client) SaveCookies() ([]byte, error)\n```\nSaveCookies returns an encoded form of the github.com cookies set on this client.  If Authenticate() has been called, this should include the github.com session cookie.  These cookies can be loaded onto a new client by calling LoadCookies.\n\nGitHub session cookies are bearer tokens that are not tied to any particular client, so should be treated with the same sensitivity as the account credentials.\n\n```go\ntype OAuthApp struct {\n\tID          int\n\tName        string\n\tDescription string\n\tState       OAuthAppReviewState\n\tRequestedBy string\n}\n```\nOAuthApp represents an OAuth application that has been reviewed for access to organization data.\n\n```go\ntype OAuthAppReviewState int\n```\nOAuthAppReviewState indicates the current state of a requested OAuth Application.\n\n```go\nconst (\n\t// OAuthAppRequested indicates access has been requested, but not reviewed.\n\tOAuthAppRequested OAuthAppReviewState = iota + 1\n\t// OAuthAppApproved indicates access has been approved.\n\tOAuthAppApproved\n\t// OAuthAppDenied indicates access has been denied.\n\tOAuthAppDenied\n)\n```\n\n```go\ntype PaymentInformation struct {\n\tPaymentMethod    string\n\tLastPayment      string\n\tCoupon           string\n\tExtraInformation string\n}\n```\nPaymentInformation for an organization on a paid plan.\n\n","path":"github.com/google/go-github/scrape","name":"scrape","synopsis":"Package scrape provides a client for interacting with GitHub using screen scraping.","isRedistributable":true}
