aminogo

package
v0.0.0-...-9feb207 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentingOnPost

func CommentingOnPost(CommunityID int, BlogID string, Message string) (*structs.PostedComment, error)

Send a text message to one of the selected chat room

func CreateNewWiki

func CreateNewWiki(communityID int, title string, content string, icon string) (*structs.CreatedWikiEntry, error)

Get a list of blogs from a targeted community

func GetBlogFeed

func GetBlogFeed(communityID int, start int, size int) (blogsFeed *structs.CommunityBlogsFeed, err error)

Get a list of blogs from a targeted community

func GetChat

func GetChat(communityID int, threadID string) (*structs.ChatRecords, error)

Get a detailed chat log from a selected chat room

func GetJoinedChatrooms

func GetJoinedChatrooms(argument *GetJoinedChatroomsOptions) (joinedChatrooms *structs.JoinedChatrooms, err error)

Get a list of joined chat rooms based ona selected community

func GetJoinedCommunities

func GetJoinedCommunities(argument *GetJoinedCommunitiesOptions) (joinedCommunities *structs.JoinedCommunities, err error)

Get a list of user's joined communities

func GetUserBlogsFromCommunity

func GetUserBlogsFromCommunity(argument *GetUserBlogFromComOptions) (blogsFeed *structs.BlogsFromCommunity, err error)

Get a list of blogs that are written from a selected users from a selected community

func Login

func Login(email string, password string) error

Get authorize, and returns a session token

func MyProfile

func MyProfile() (profile *structs.MyProfile, err error)

Return a complete REST respond as a struct, all the info are contain inside the "Account" field

func PostBlog

func PostBlog(communityID int, title string, content string, mediaList *[]*MediaContainer) (*structs.PostedBlog, error)

Post a blog post to a selected community Post a blog post to a selected community

func SendChat

func SendChat(CommunityID int, ThreadID string, Message string) (*structs.SentChat, error)

Send a text message to one of the selected chat room

Types

type GetJoinedChatroomsOptions

type GetJoinedChatroomsOptions struct {
	CommunityID int
	Start       int
	Size        int
}

type GetJoinedCommunitiesOptions

type GetJoinedCommunitiesOptions struct {
	Start int
	Size  int
}

type GetUserBlogFromComOptions

type GetUserBlogFromComOptions struct {
	CommunityID int
	UUID        string
	Start       int
	Size        int
}

type MediaContainer

type MediaContainer struct {
	FinalDes string

	Captions interface{}
	// contains filtered or unexported fields
}

A container that store a upload/pre-upload media data

func UploadMedia

func UploadMedia(url string) (*MediaContainer, error)

Create new MediaContainer

func (*MediaContainer) GenerateReferenceKey

func (mc *MediaContainer) GenerateReferenceKey() string

Generate a random reference key for PostBlog function to use

func (*MediaContainer) Local

func (mc *MediaContainer) Local(pathArg *PathInterface) (*structs.UploadedMedia, error)

Upload a local resource or a local binary file

type PathInterface

type PathInterface struct {
	BaseDirectory string
	FileName      string
}

Jump to

Keyboard shortcuts

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