Documentation ¶
Index ¶
- Constants
- func AddModeratorMutation() string
- func AllowedActionsQuery() string
- func BanStreamChatUserMutation() string
- func BrowsePageSearchCategoriesQuery() string
- func DeleteChatMutation() string
- func DeleteLastBroadcastMutation() string
- func EmoteDeleteMutation() string
- func EmoteSaveMutation() string
- func FollowUserMutation() string
- func FollowingPageLivestreamsQuery() string
- func FollowingPageVideosQuery() string
- func GenerateStreamKeyMutation() string
- func GlobalInformationQuery() string
- func HomePageCarouselsQuery() string
- func HomePageCategoriesQuery() string
- func HomePageLeaderboardQuery() string
- func HomePageLivestreamQuery() string
- func LivestreamChatRoomInfoQuery() string
- func LivestreamLanguagesQuery() string
- func LivestreamPageQuery() string
- func LivestreamPageRefetchQuery() string
- func LivestreamProfileFollowersQuery() string
- func LivestreamProfileFollowingQuery() string
- func LivestreamProfileReplayQuery() string
- func LivestreamProfileVideoQuery() string
- func LivestreamProfileWalletQuery() string
- func LoginWithWalletMutation() string
- func MeBalanceQuery() string
- func MeDashboardQuery() string
- func MeGlobalQuery() string
- func MeLivestreamQuery() string
- func MePartnerProgressQuery() string
- func MeSubscribingQuery() string
- func RemoveModeratorMutation() string
- func SearchPageQuery() string
- func SendStreamChatMessageMutation() string
- func SetAllowStickerMutation() string
- func SetChatIntervalMutation() string
- func SetStreamTemplateMutation() string
- func StreamChatBannedUsersQuery() string
- func StreamChatModeratorsQuery() string
- func StreamDonateMutation() string
- func StreamMessageSubscription() string
- func TopContributorsQuery() string
- func UnbanStreamChatUserMutation() string
- func UnfollowUserMutation() string
- func VideoPermLinkMutation() string
- type AddModeratorArgs
- type AllowedActionsArgs
- type BanStreamChatUserArgs
- type BrowsePageSearchCategoriesArgs
- type Client
- func (c *Client) AllowedActions(args AllowedActionsArgs) (Response, error)
- func (c *Client) Feed(key string) (*Feed, error)
- func (c *Client) FeedCount() int
- func (c *Client) GlobalInformation() (Response, error)
- func (c *Client) LivestreamChatRoomInfo(args LivestreamChatRoomInfoArgs) (Response, error)
- func (c *Client) LivestreamPage(args LivestreamPageArgs) (Response, error)
- func (c *Client) LivestreamProfileFollowers(args LivestreamProfileFollowersArgs) (Response, error)
- func (c *Client) LivestreamProfileFollowing(args LivestreamProfileFollowingArgs) (Response, error)
- func (c *Client) LivestreamProfileReplays(args LivestreamProfileReplayArgs) (Response, error)
- func (c *Client) LivestreamProfileVideos(args LivestreamProfileVideoArgs) (Response, error)
- func (c *Client) LivestreamProfileWallet(args LivestreamProfileWalletArgs) (Response, error)
- func (c *Client) MeBalance() (Response, error)
- func (c *Client) MeDashboard(args MeDashboardArgs) (Response, error)
- func (c *Client) MeGlobal() (Response, error)
- func (c *Client) MeLivestream(args MeLivestreamArgs) (Response, error)
- func (c *Client) MePartnerProgress() (Response, error)
- func (c *Client) MeSubscribing(args MeSubscribingArgs) (Response, error)
- func (c *Client) Send(req Request) (Response, error)
- func (c *Client) SendStreamChat(args SendStreamChatMessageArgs) (Response, error)
- func (c *Client) StreamChatBannedUsers(args StreamChatBannedUsersArgs) (Response, error)
- func (c *Client) StreamChatModerators(args StreamChatModeratorsArgs) (Response, error)
- func (c *Client) StreamMessageFeed(args StreamMessageFeedArgs) (*Subscription, error)
- func (c *Client) TopContributors(args TopContributorsArgs) (Response, error)
- type DeleteChatArgs
- type DeleteEmoteInput
- type DeletePastBroadcastArgs
- type DonateInput
- type EmoteDeleteArgs
- type EmoteSaveArgs
- type Feed
- func (f *Feed) Active() bool
- func (f *Feed) Close()
- func (f *Feed) Consume(conn *websocket.Conn) (chan<- bool, <-chan []byte)
- func (f *Feed) Publish(p []byte) (int, error)
- func (f *Feed) Start(socketRequest WebSocketRequest, websocketFunc WebsocketFunc) error
- func (f *Feed) String() string
- func (f *Feed) Subscribe() (*Subscription, error)
- func (f *Feed) Unsubscribe(subscription Subscription)
- type FeedMessage
- type FollowUserArgs
- type FollowingPageLivestreamsArgs
- type FollowingPageVideosArgs
- type HomePageCarouselsArgs
- type HomePageCategoriesArgs
- type HomePageLivestreamArgs
- type LivestreamChatRoomInfoArgs
- type LivestreamLanguagesArgs
- type LivestreamPageArgs
- type LivestreamPageRefetchArgs
- type LivestreamProfileFollowersArgs
- type LivestreamProfileFollowingArgs
- type LivestreamProfileReplayArgs
- type LivestreamProfileVideoArgs
- type LivestreamProfileWalletArgs
- type LoginWithWalletArgs
- type MeDashboardArgs
- type MeLivestreamArgs
- type MeSubscribingArgs
- type RemoveModeratorArgs
- type Request
- type Response
- type SaveEmoteInput
- type SearchPageArgs
- type SendStreamChatMessageArgs
- type SendStreamChatMessageInput
- type SetAllowStickerArgs
- type SetChatIntervalArgs
- type SetStreamTemplateArgs
- type SetStreamTemplateInput
- type StreamChatBannedUsersArgs
- type StreamChatModeratorsArgs
- type StreamDonateArgs
- type StreamMessageFeedArgs
- type Subscription
- type TopContributorsArgs
- type UnbanStreamChatUserArgs
- type UnfollowUserArgs
- type WebSocketRequest
- type WebsocketFunc
Constants ¶
const ContributionSummaryAll = "ALL_TIME"
const ContributionSummaryMonth = "THIS_MONTH"
Contribution Summary Rules
const ContributionSummaryStream = "THIS_STREAM"
const DefaultURL = "https://graphigo.prd.dlive.tv/"
DefaultURL is the url used by a API client if none is given
const DefaultURLWebsocket = "wss://graphigostream.prd.dlive.tv/"
const RoomRoleMember = "Member"
const RoomRoleModerator = "Moderator"
const RoomRoleOwner = "Owner"
Room Roles
const SortAlpha = "AZ"
Sorting
const SortTrending = "Trending"
Variables ¶
This section is empty.
Functions ¶
func AddModeratorMutation ¶
func AddModeratorMutation() string
AddModeratorMutation returns the graphql mutation for setting a user in a streamer's chat as a moderator
func AllowedActionsQuery ¶
func AllowedActionsQuery() string
AllowedActionsQuery returns the graphql query for getting a list of actions one user may take upon another on a given streamer's page
func BanStreamChatUserMutation ¶
func BanStreamChatUserMutation() string
BanStreamChatUserMutation returns the graphql mutation for banning a user from a streamer's chat Couldn't get in dev console, is based on UnbanStreamChatUserMutation
func BrowsePageSearchCategoriesQuery ¶
func BrowsePageSearchCategoriesQuery() string
BrowsePageSearchCategoriesQuery returns the graphql query to get all the categories you can filter on while browsing streams
func DeleteChatMutation ¶
func DeleteChatMutation() string
DeleteChatMutation returns the graphql mutation for deleting a message from a streamer's chat
func DeleteLastBroadcastMutation ¶
func DeleteLastBroadcastMutation() string
DeleteLastBroadcastMutation returns the graphql mutation for deleting a stream replay
func EmoteDeleteMutation ¶
func EmoteDeleteMutation() string
EmoteDeleteMutation returns the graphql mutation for removing a sticker from the list of saved stickers for the logged in user
func EmoteSaveMutation ¶
func EmoteSaveMutation() string
EmoteSaveMutation returns the graphql mutation for saving a sticker emote for the logged in user
func FollowUserMutation ¶
func FollowUserMutation() string
FollowUserMutation returns the graphql mutation for becoming a follower of a streamer
func FollowingPageLivestreamsQuery ¶
func FollowingPageLivestreamsQuery() string
FollowingPageLivestreamsQuery returns the graphql query to get the streamers the currently authenticated user is following
func FollowingPageVideosQuery ¶
func FollowingPageVideosQuery() string
FollowingPageVideosQuery returns the graphql query for getting videos uploaded by users the authenticated user is following
func GenerateStreamKeyMutation ¶
func GenerateStreamKeyMutation() string
GenerateStreamKeyMutation returns the graphql mutation for generating the key needed to stream data to a livestream profile
func GlobalInformationQuery ¶
func GlobalInformationQuery() string
GlobalInformationQuery returns the graphql query string for retrieving global information about Dlive
func HomePageCarouselsQuery ¶
func HomePageCarouselsQuery() string
HomePageCarouselsQuery returns the graphql query to get data used to populate the home page stream carousels
func HomePageCategoriesQuery ¶
func HomePageCategoriesQuery() string
HomePageCategoriesQuery gives the graphql query to get data about the available stream categories
func HomePageLeaderboardQuery ¶
func HomePageLeaderboardQuery() string
HomePageLeaderboardQuery gives the graphql query to get data about the streamers with the biggest gains in LINO
func HomePageLivestreamQuery ¶
func HomePageLivestreamQuery() string
HomePageLivestreamQuery gives the graphql query to get data about the live streams that would be shown on the homepage
func LivestreamChatRoomInfoQuery ¶
func LivestreamChatRoomInfoQuery() string
LivestreamChatRoomInfoQuery gives the graphql query to get data related to the chat of a livestream page
func LivestreamLanguagesQuery ¶
func LivestreamLanguagesQuery() string
LivestreamLanguagesQuery returns the graphql query to get data about the available languages to set a stream to
func LivestreamPageQuery ¶
func LivestreamPageQuery() string
LivestreamPageQuery gives the graphql query for obtaining data about a user's livestream
func LivestreamPageRefetchQuery ¶
func LivestreamPageRefetchQuery() string
LivestreamPageRefetchQuery gives the graphql query refreshing data about a specific streamer's page
func LivestreamProfileFollowersQuery ¶
func LivestreamProfileFollowersQuery() string
LivestreamProfileFollowersQuery returns the graphql query for getting a streamer's followers
func LivestreamProfileFollowingQuery ¶
func LivestreamProfileFollowingQuery() string
LivestreamProfileFollowingQuery returns the graphql query for getting the users a streamer follows
func LivestreamProfileReplayQuery ¶
func LivestreamProfileReplayQuery() string
LivestreamProfileReplayQuery returns the graphql query for getting the replays of a specified streamer
func LivestreamProfileVideoQuery ¶
func LivestreamProfileVideoQuery() string
LivestreamProfileVideoQuery returns the graphql query for getting the videos of a specified streamer
func LivestreamProfileWalletQuery ¶
func LivestreamProfileWalletQuery() string
LivestreamProfileWalletQuery returns the graphql query for getting balance, earnings, and transactions of a streamer
func LoginWithWalletMutation ¶
func LoginWithWalletMutation() string
LoginWithWalletMutation returns the graphql mutation for logging with a LINO wallet account
func MeBalanceQuery ¶
func MeBalanceQuery() string
MeBalanceQuery gives the graphql query to obtain information about authenticated user's balance
func MeDashboardQuery ¶
func MeDashboardQuery() string
MeDashboardQuery gives the graphql query to obtain information about the authenticated user's dashboard (settings, stats, chatroom)
func MeGlobalQuery ¶
func MeGlobalQuery() string
MeGlobalQuery returns the graphql query for retrieving about the current user
func MeLivestreamQuery ¶
func MeLivestreamQuery() string
MeLivestreamQuery provides the graphql query for obtaining data related to the current user's livestream
func MePartnerProgressQuery ¶
func MePartnerProgressQuery() string
MePartnerProgressQuery returns the graphql query to get information about the currently authenticated user's partner progress
func MeSubscribingQuery ¶
func MeSubscribingQuery() string
MeSubscribingQuery returns the graphql query to get the list of users the currently authenticated user is subbed to
func RemoveModeratorMutation ¶
func RemoveModeratorMutation() string
RemoveModeratorMutation returns the graphql mutation for removing a user as a moderator in the given streamer's chat
func SearchPageQuery ¶
func SearchPageQuery() string
SearchPageQuery returns the graphql query for searching streamers, active streams, and videos for a specific term
func SendStreamChatMessageMutation ¶
func SendStreamChatMessageMutation() string
SendStreamChatMessageMutation returns the graphql mutation for sending a message to a streamer's chat
func SetAllowStickerMutation ¶
func SetAllowStickerMutation() string
SetAllowStickerMutation returns the graphql mutation for enabling or disabling stickers in a streamer's chat
func SetChatIntervalMutation ¶
func SetChatIntervalMutation() string
SetChatIntervalMutation returns the graphql mutation for setting the how often viewers can send messages to a streamer's chat
func SetStreamTemplateMutation ¶
func SetStreamTemplateMutation() string
SetStreamTemplateMutation returns the graphql mutation for saving a user's stream metadata
func StreamChatBannedUsersQuery ¶
func StreamChatBannedUsersQuery() string
StreamChatBannedUsersQuery returns the graphql query for getting a list of users banned in a specific streamer's chat
func StreamChatModeratorsQuery ¶
func StreamChatModeratorsQuery() string
StreamChatModeratorsQuery returns the graphql query for getting a list of users that are moderators in a specific streamer's chat
func StreamDonateMutation ¶
func StreamDonateMutation() string
StreamDonateMutation returns the graphql mutation for donating LINO to a streamer
func StreamMessageSubscription ¶
func StreamMessageSubscription() string
StreamMessageSubscription gives the graphql query to establish a subscription for a livestream's chat messages
func TopContributorsQuery ¶
func TopContributorsQuery() string
TopContributorsQuery gives the graphql query to get data about users who are the top contributors for a livestream page
func UnbanStreamChatUserMutation ¶
func UnbanStreamChatUserMutation() string
UnbanStreamChatUserMutation returns the graphql mutation for unbanning a user in a streamer's chat
func UnfollowUserMutation ¶
func UnfollowUserMutation() string
UnfollowUserMutation returns the graphql mutation for unfollowing a streamer
func VideoPermLinkMutation ¶
func VideoPermLinkMutation() string
VideoPermLinkMutation returns the graphql mutation for uploading a video to DLive
Types ¶
type AddModeratorArgs ¶
type AddModeratorArgs struct {
Username string `json:"username"`
}
type AllowedActionsArgs ¶
type BanStreamChatUserArgs ¶
type BanStreamChatUserArgs UnbanStreamChatUserArgs
type Client ¶
type Client struct { Endpoint string // The endpoint for DLive's API WebsocketEndpoint string // The endpoint used for making websocket connections Auth string // An authorization token to send along with requests Feeds map[string]Feed // Any active websocket streams the client is consuming }
Client is used to send requests to DLive's API
func (*Client) AllowedActions ¶
func (c *Client) AllowedActions(args AllowedActionsArgs) (Response, error)
func (*Client) GlobalInformation ¶
GlobalInformation fetches language information about DLive
func (*Client) LivestreamChatRoomInfo ¶
func (c *Client) LivestreamChatRoomInfo(args LivestreamChatRoomInfoArgs) (Response, error)
func (*Client) LivestreamPage ¶
func (c *Client) LivestreamPage(args LivestreamPageArgs) (Response, error)
Query Methods
func (*Client) LivestreamProfileFollowers ¶
func (c *Client) LivestreamProfileFollowers(args LivestreamProfileFollowersArgs) (Response, error)
func (*Client) LivestreamProfileFollowing ¶
func (c *Client) LivestreamProfileFollowing(args LivestreamProfileFollowingArgs) (Response, error)
func (*Client) LivestreamProfileReplays ¶
func (c *Client) LivestreamProfileReplays(args LivestreamProfileReplayArgs) (Response, error)
func (*Client) LivestreamProfileVideos ¶
func (c *Client) LivestreamProfileVideos(args LivestreamProfileVideoArgs) (Response, error)
func (*Client) LivestreamProfileWallet ¶
func (c *Client) LivestreamProfileWallet(args LivestreamProfileWalletArgs) (Response, error)
func (*Client) MeDashboard ¶
func (c *Client) MeDashboard(args MeDashboardArgs) (Response, error)
func (*Client) MeLivestream ¶
func (c *Client) MeLivestream(args MeLivestreamArgs) (Response, error)
func (*Client) MePartnerProgress ¶
func (*Client) MeSubscribing ¶
func (c *Client) MeSubscribing(args MeSubscribingArgs) (Response, error)
func (*Client) Send ¶
Send takes the provided request, sends it to the DLive API endpoint, then returns the decoded JSON response
func (*Client) SendStreamChat ¶
func (c *Client) SendStreamChat(args SendStreamChatMessageArgs) (Response, error)
Mutation Methods
func (*Client) StreamChatBannedUsers ¶
func (c *Client) StreamChatBannedUsers(args StreamChatBannedUsersArgs) (Response, error)
func (*Client) StreamChatModerators ¶
func (c *Client) StreamChatModerators(args StreamChatModeratorsArgs) (Response, error)
func (*Client) StreamMessageFeed ¶
func (c *Client) StreamMessageFeed(args StreamMessageFeedArgs) (*Subscription, error)
Subscription Methods
func (*Client) TopContributors ¶
func (c *Client) TopContributors(args TopContributorsArgs) (Response, error)
type DeleteChatArgs ¶
type DeleteEmoteInput ¶
type DeletePastBroadcastArgs ¶
type DeletePastBroadcastArgs struct {
Permlink string `json:"permlink"`
}
type DonateInput ¶
type EmoteDeleteArgs ¶
type EmoteDeleteArgs struct {
Input DeleteEmoteInput `json:"input"`
}
type EmoteSaveArgs ¶
type EmoteSaveArgs struct {
Input SaveEmoteInput `json:"input"`
}
type Feed ¶
type Feed struct {
// contains filtered or unexported fields
}
Feed is a real-time data stream using a websocket When a feed receives data from its websocket, its writes that data to all its subscribers
func (*Feed) Close ¶
func (f *Feed) Close()
Close sends a termination signal to consumer go routine, closes the termination signal channel, and closes all subscriptions
func (*Feed) Consume ¶
Consume uses the provided websocket to continuously read data from the socket and write it to the downstream channel Go routine will return when a termination signal is sent via the quit channel
func (*Feed) Publish ¶
Publish will send the data given to all output channels it currently knows of Returns the length of data, times the number of output channels data was written to Returns an error if Feed has no output channels
func (*Feed) Start ¶
func (f *Feed) Start(socketRequest WebSocketRequest, websocketFunc WebsocketFunc) error
Start uses the provided Request and websocketFunc to start a GraphQL websocket connection Returns an error if the feed already been started
func (*Feed) Subscribe ¶
func (f *Feed) Subscribe() (*Subscription, error)
Subscribe creates a new Subscription for the feed
func (*Feed) Unsubscribe ¶
func (f *Feed) Unsubscribe(subscription Subscription)
Unsubscribe closes the subscription's channel and removes it from its map of subscribers
type FeedMessage ¶
type FeedMessage struct { MessageType string `json:"type"` // The type of message sent from the API Payload map[string]interface{} `json:"payload"` // The contents of the Response body }
FeedMessage represents a GraphQL subscription message from DLive's API
type FollowUserArgs ¶
type FollowUserArgs struct {
Streamer string `json:"streamer"`
}
type FollowingPageVideosArgs ¶
type FollowingPageVideosArgs FollowingPageLivestreamsArgs
type HomePageCarouselsArgs ¶
type HomePageCategoriesArgs ¶
type HomePageLivestreamArgs ¶
type LivestreamLanguagesArgs ¶
type LivestreamLanguagesArgs struct {
CategoryID int `json:"categoryID"`
}
type LivestreamPageArgs ¶
type LivestreamPageRefetchArgs ¶
type LivestreamPageRefetchArgs LivestreamPageArgs
type LivestreamProfileFollowingArgs ¶
type LivestreamProfileFollowingArgs LivestreamProfileFollowersArgs
type LoginWithWalletArgs ¶
type MeDashboardArgs ¶
type MeDashboardArgs struct {
IsLoggedIn bool `json:"isLoggedIn"`
}
type MeLivestreamArgs ¶
type MeLivestreamArgs struct {
IsLoggedIn bool `json:"isLoggedIn"`
}
type MeSubscribingArgs ¶
type RemoveModeratorArgs ¶
type RemoveModeratorArgs AddModeratorArgs
type Request ¶
type Request struct { Query string `json:"query"` Vars interface{} `json:"variables"` }
type Response ¶
type Response struct { Data map[string]interface{} `json:"data"` Errors []responseError `json:"errors"` }
type SaveEmoteInput ¶
type SearchPageArgs ¶
type SendStreamChatMessageArgs ¶
type SendStreamChatMessageArgs struct {
Input SendStreamChatMessageInput `json:"input"`
}
type SetAllowStickerArgs ¶
type SetAllowStickerArgs struct {
Allow bool `json:"allow"`
}
type SetChatIntervalArgs ¶
type SetChatIntervalArgs struct {
Seconds int `json:"seconds"`
}
type SetStreamTemplateArgs ¶
type SetStreamTemplateArgs struct {
Template SetStreamTemplateInput `json:"template"`
}
type SetStreamTemplateInput ¶
type StreamChatModeratorsArgs ¶
type StreamChatModeratorsArgs StreamChatBannedUsersArgs
type StreamDonateArgs ¶
type StreamDonateArgs struct {
Input DonateInput `json:"input"`
}
type StreamMessageFeedArgs ¶
type StreamMessageFeedArgs struct {
Streamer string `json:"streamer"`
}
type Subscription ¶
type Subscription struct { Key string // The unique ID for this subscription for its feed Messages <-chan []byte // Channel that all new Response are written to // contains filtered or unexported fields }
func (Subscription) Close ¶
func (s Subscription) Close()
Close removes this subscription from the feed
type TopContributorsArgs ¶
type UnbanStreamChatUserArgs ¶
type UnfollowUserArgs ¶
type UnfollowUserArgs FollowUserArgs
type WebSocketRequest ¶
type WebsocketFunc ¶
type WebsocketFunc func(request WebSocketRequest) (*websocket.Conn, error)
WebsocketFunc is the function used to setup the websocket used by a Feed