🔨 Small refactoring
This commit is contained in:
parent
6597dfae6c
commit
ec22d34bfc
|
@ -13,7 +13,7 @@ import (
|
|||
// to keep individual author names and profile links for each of their
|
||||
// channels. On success, returns an Account object with the regular fields and
|
||||
// an additional access_token field.
|
||||
func CreateAccount(shortName string, authorName string, authorURL string) (*Account, error) {
|
||||
func CreateAccount(shortName, authorName, authorURL string) (*Account, error) {
|
||||
var args http.Args
|
||||
|
||||
// Account name, helps users with several accounts remember which they are
|
||||
|
|
|
@ -106,7 +106,7 @@ func domToNode(domNode *html.Node) interface{} {
|
|||
return nodeElement
|
||||
}
|
||||
|
||||
func parseEmbed(service string, url string) map[string]string {
|
||||
func parseEmbed(service, url string) map[string]string {
|
||||
return map[string]string{
|
||||
"src": fmt.Sprint("/embed/", service, "?url=", url),
|
||||
"width": "640",
|
||||
|
|
4
page.go
4
page.go
|
@ -126,7 +126,7 @@ func GetPage(path string, returnContent bool) (*Page, error) {
|
|||
|
||||
// GetPageList get a list of pages belonging to a Telegraph account. Returns
|
||||
// a PageList object, sorted by most recently created pages first.
|
||||
func (account *Account) GetPageList(offset int, limit int) (*PageList, error) {
|
||||
func (account *Account) GetPageList(offset, limit int) (*PageList, error) {
|
||||
var args http.Args
|
||||
|
||||
// Access token of the Telegraph account.
|
||||
|
@ -155,7 +155,7 @@ func (account *Account) GetPageList(offset int, limit int) (*PageList, error) {
|
|||
// GetViews get the number of views for a Telegraph article. By default, the
|
||||
// total number of page views will be returned. Returns a PageViews object
|
||||
// on success.
|
||||
func GetViews(path string, hour int, day int, month int, year int) (*PageViews, error) {
|
||||
func GetViews(path string, hour, day, month, year int) (*PageViews, error) {
|
||||
var args http.Args
|
||||
|
||||
if hour > -1 {
|
||||
|
|
Loading…
Reference in New Issue