favourites.go
author Mikael Berthe <mikael@lilotux.net>
Wed, 10 May 2017 20:12:26 +0200
changeset 179 fbe21b4aabda
parent 160 9f7e683b323f
child 207 301d5b94be3f
permissions -rw-r--r--
Version 1.5.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
130
c450bb73f59a Update credits
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
     1
/*
c450bb73f59a Update credits
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
     2
Copyright 2017 Mikael Berthe
c450bb73f59a Update credits
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
     3
c450bb73f59a Update credits
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
     4
Licensed under the MIT license.  Please see the LICENSE file is this directory.
c450bb73f59a Update credits
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
     5
*/
c450bb73f59a Update credits
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
     6
138
23d3a518d0ad Update package name in source files
Mikael Berthe <mikael@lilotux.net>
parents: 130
diff changeset
     7
package madon
93
d427d8aa75f9 Add GetFavourites()
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
d427d8aa75f9 Add GetFavourites()
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     9
// GetFavourites returns the list of the user's favourites
156
70aadba26338 Add field "All" to LimitParams, change Limit behaviour
Mikael Berthe <mikael@lilotux.net>
parents: 155
diff changeset
    10
// If lopt.All is true, several requests will be made until the API server
70aadba26338 Add field "All" to LimitParams, change Limit behaviour
Mikael Berthe <mikael@lilotux.net>
parents: 155
diff changeset
    11
// has nothing to return.
70aadba26338 Add field "All" to LimitParams, change Limit behaviour
Mikael Berthe <mikael@lilotux.net>
parents: 155
diff changeset
    12
// If lopt.Limit is set (and not All), several queries can be made until the
70aadba26338 Add field "All" to LimitParams, change Limit behaviour
Mikael Berthe <mikael@lilotux.net>
parents: 155
diff changeset
    13
// limit is reached.
149
5f922977d7c7 Add support for limits and paging ({since,max}_id) API parameters
Mikael Berthe <mikael@lilotux.net>
parents: 138
diff changeset
    14
func (mc *Client) GetFavourites(lopt *LimitParams) ([]Status, error) {
160
9f7e683b323f Refactor methods returning a list of statuses
Mikael Berthe <mikael@lilotux.net>
parents: 156
diff changeset
    15
	return mc.getMultipleStatuses("favourites", nil, lopt)
93
d427d8aa75f9 Add GetFavourites()
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    16
}