Humble doc comments.

This commit is contained in:
Alexey Skobkin 2016-03-29 10:46:33 +03:00
parent 41c234abe0
commit ce9019d9e5
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
// Package point imlements simple Point API wrapper for getting different info
package point
import (
@ -16,6 +17,7 @@ type PointClient struct {
token Token
}
// New creates new Point.im API client instance and initialize it with provided URL
func New(apiUrl string) PointClient {
return PointClient{
simple_http.Client{http.Client{}},
@ -24,6 +26,7 @@ func New(apiUrl string) PointClient {
}
}
// Login tries to log in to Point.im API and store authentication token on success. Token will be used automatically on next API calls.
func (c *PointClient) Login(login, password string) (Token, error) {
var token Token
@ -53,6 +56,7 @@ func (c *PointClient) Login(login, password string) (Token, error) {
return token, nil
}
// GetRecentAllPostsPage gets most recent /all posts page
func (c *PointClient) GetRecentAllPostsPage() (Page, error) {
var page Page
@ -87,6 +91,7 @@ func (c *PointClient) GetRecentAllPostsPage() (Page, error) {
return page, nil
}
// GetNextAllPostsPageBeforeUid gets next /all page after provided post uid
func (c *PointClient) GetNextAllPostsPageBeforeUid(uid int) (Page, error) {
var nextPage Page
@ -124,6 +129,7 @@ func (c *PointClient) GetNextAllPostsPageBeforeUid(uid int) (Page, error) {
return nextPage, nil
}
// GetNextAllPostsPage gets next /all page after provided page
func (c *PointClient) GetNextAllPostsPage(page Page) (Page, error) {
var nextPage Page