Documentation
¶
Index ¶
Constants ¶
View Source
const ( WORDS_PER_LINE_CLAIM = 7 WORDS_PER_LINE_ARGUMENT = 10 WORDS_PER_LINE_COMMENT = 10 WORDS_PER_LINE_HIGHLIGHT = 10 MAX_CHARS_PER_LINE = 40 BODY_LINES_CLAIM = 3 BODY_LINES_ARGUMENT = 4 BODY_LINES_COMMENT = 4 BODY_LINES_HIGHLIGHT = 4 )
View Source
const ArgumentByIDQuery = `` /* 226-byte string literal not displayed */
ArgumentByIDQuery fetches an argument by the given ID
View Source
const ClaimByIDQuery = `` /* 236-byte string literal not displayed */
ClaimByIDQuery fetches a claim by the given ID
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentByIDResponse ¶
type ArgumentByIDResponse struct {
ClaimArgument ArgumentObject `json:"claimArgument"`
}
ArgumentByIDResponse defines the JSON response
type ArgumentObject ¶
type ArgumentObject struct {
ID int64 `json:"id"`
Body string `json:"body"`
Summary string `json:"summary"`
Creator UserObject `json:"creator"`
UpvotedCount int `json:"upvotedCount"`
}
ArgumentObject defines the schema of an argument
type ClaimByIDResponse ¶
type ClaimByIDResponse struct {
Claim ClaimObject `json:"claim"`
}
ClaimByIDResponse defines the JSON response
type ClaimObject ¶
type ClaimObject struct {
ID int64 `json:"id"`
Body string `json:"body"`
Source string `json:"source"`
Community CommunityObject `json:"community"`
Creator UserObject `json:"creator"`
ArgumentCount int `json:"argumentCount"`
Comments []CommentObject `json:"comments"`
}
ClaimObject defines the schema of a story
func (ClaimObject) GetSource ¶
func (claim ClaimObject) GetSource() string
GetSource returns the hostname of the source
func (ClaimObject) HasSource ¶
func (claim ClaimObject) HasSource() bool
HasSource returns whether a story has a source or not
type CommentObject ¶
type CommentObject struct {
ID int64 `json:"id"`
Body string `json:"body"`
Creator UserObject `json:"creator"`
}
CommentObject defines the schema of a comment
type CommunityObject ¶
CommunityObject defines the schema of a category
type UserObject ¶
type UserObject struct {
Address string `json:"address"`
UserProfile UserProfileObject `json:"userProfile"`
}
UserObject defines the schema of a user
type UserProfileObject ¶
type UserProfileObject struct {
AvatarURL string `json:"avatarURL"`
FullName string `json:"fullName"`
Username string `json:"username"`
}
UserProfileObject defines the schema of the twitter profile
Click to show internal directories.
Click to hide internal directories.