From ce9019d9e526c5c1cd648a336e2de0169f3f4443 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Tue, 29 Mar 2016 10:46:33 +0300 Subject: [PATCH] Humble doc comments. --- client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client.go b/client.go index a8d5666..7ae9509 100644 --- a/client.go +++ b/client.go @@ -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