requests

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: BSD-3-Clause Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(token, query string) (*http.Response, error)

Types

type Data

type Data struct {
	Viewer Viewer `json:"viewer"`
}

type DataUser

type DataUser struct {
	Viewer ViewerUser `json:"viewer"`
}

type GraphQLResponse

type GraphQLResponse struct {
	Data Data `json:"data"`
}

type GraphQLUserResponse

type GraphQLUserResponse struct {
	Data DataUser `json:"data"`
}

type LanguageEdge

type LanguageEdge struct {
	Node LanguageNode `json:"node"`
	Size int          `json:"Size"`
}

type LanguageNode

type LanguageNode struct {
	Name  string `json:"Name"`
	Color string `json:"color"`
}

type Languages

type Languages struct {
	Edges []LanguageEdge `json:"edges"`
}

type OrganizationNode

type OrganizationNode struct {
	Login         string       `json:"login"`
	CanAdminister bool         `json:"viewerCanAdminister"`
	Repositories  Repositories `json:"repositories"`
}

type Organizations

type Organizations struct {
	Nodes    []OrganizationNode `json:"nodes"`
	PageInfo PageInfo           `json:"pageInfo"`
}

type PageInfo

type PageInfo struct {
	EndCursor       string `json:"endCursor"`
	StartCursor     string `json:"startCursor"`
	HasNextPage     bool   `json:"hasNextPage"`     // Example
	HasPreviousPage bool   `json:"hasPreviousPage"` // Example
}

type PrimaryLanguage

type PrimaryLanguage struct {
	Name string `json:"Name"`
}

type Repositories

type Repositories struct {
	Edges []RepositoryEdge `json:"edges"`
}

type RepositoryEdge

type RepositoryEdge struct {
	Node RepositoryNode `json:"node"`
}

type RepositoryNode

type RepositoryNode struct {
	Name            string          `json:"name"`
	NameWithOwner   string          `json:"nameWithOwner"`
	PrimaryLanguage PrimaryLanguage `json:"primaryLanguage"`
	Languages       Languages       `json:"languages"`
}

type Result

type Result struct {
	Repositories []*ResultRepository
}

func FetchOrganizations

func FetchOrganizations(loginName, token string, ignored ...string) (*Result, error)

func FetchUser

func FetchUser(loginName, token string, ignored ...string) (*Result, error)

type ResultLanguage

type ResultLanguage struct {
	Name  string
	Color string
	Size  int
}

type ResultOrganizations

type ResultOrganizations struct {
	List      map[string][]string
	Languages map[string]int
}

type ResultRepository

type ResultRepository struct {
	Organization string
	Name         string
	Languages    []*ResultLanguage
}

type Viewer

type Viewer struct {
	Organizations Organizations `json:"organizations"`
}

type ViewerUser

type ViewerUser struct {
	Repositories Repositories `json:"repositories"`
	PageInfo     PageInfo     `json:"pageInfo"`
}

Jump to

Keyboard shortcuts

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