Documentation
¶
Overview ¶
Copyright © 2023 Philipp Wolfer <phw@uploadedlobster.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2023 Philipp Wolfer <phw@uploadedlobster.com>
This file is part of Scotty.
Scotty is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Scotty is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Scotty. If not, see <https://www.gnu.org/licenses/>.
Copyright © 2023 Philipp Wolfer <phw@uploadedlobster.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Constants
- type Album
- type Artist
- type Client
- type FavoriteTrack
- type FavoriteTracksResult
- type FunkwhaleApiBackend
- func (b *FunkwhaleApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, ...)
- func (b *FunkwhaleApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, ...)
- func (b *FunkwhaleApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
- func (b *FunkwhaleApiBackend) Name() string
- func (b *FunkwhaleApiBackend) Options() []models.BackendOption
- type Listening
- type ListeningsResult
- type Track
- type Upload
- type User
Constants ¶
const FunkwhaleClientName = "Funkwhale"
const MaxItemsPerGet = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HttpClient *resty.Client // contains filtered or unexported fields }
func (Client) GetFavoriteTracks ¶
func (c Client) GetFavoriteTracks(page int, perPage int) (result FavoriteTracksResult, err error)
func (Client) GetHistoryListenings ¶
type FavoriteTrack ¶
type FavoriteTrack struct { Id int `json:"int"` User User `json:"user"` Track Track `json:"track"` CreationDate string `json:"creation_date"` }
func (FavoriteTrack) AsLove ¶
func (f FavoriteTrack) AsLove() models.Love
type FavoriteTracksResult ¶
type FavoriteTracksResult struct { Count int `json:"count"` Previous string `json:"previous"` Next string `json:"next"` Results []FavoriteTrack `json:"results"` }
type FunkwhaleApiBackend ¶
type FunkwhaleApiBackend struct {
// contains filtered or unexported fields
}
func (*FunkwhaleApiBackend) ExportListens ¶
func (b *FunkwhaleApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.Progress)
func (*FunkwhaleApiBackend) ExportLoves ¶
func (b *FunkwhaleApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, progress chan models.Progress)
func (*FunkwhaleApiBackend) FromConfig ¶
func (b *FunkwhaleApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
func (*FunkwhaleApiBackend) Name ¶
func (b *FunkwhaleApiBackend) Name() string
func (*FunkwhaleApiBackend) Options ¶ added in v0.3.0
func (b *FunkwhaleApiBackend) Options() []models.BackendOption