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 Client
- type Error
- type GenericResult
- type GetScrobblesResult
- type MalojaApiBackend
- func (b *MalojaApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, ...)
- func (b *MalojaApiBackend) FinishImport() error
- func (b *MalojaApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
- func (b *MalojaApiBackend) ImportListens(export models.ListensResult, importResult models.ImportResult, ...) (models.ImportResult, error)
- func (b *MalojaApiBackend) Name() string
- func (b *MalojaApiBackend) Options() []models.BackendOption
- func (b *MalojaApiBackend) StartImport() error
- type NewScrobble
- type NewScrobbleResult
- type Pagination
- type Scrobble
- type Track
Constants ¶
const MaxItemsPerGet = 1000
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) GetScrobbles ¶
func (c Client) GetScrobbles(page int, perPage int) (result GetScrobblesResult, err error)
func (Client) NewScrobble ¶
func (c Client) NewScrobble(scrobble NewScrobble) (result NewScrobbleResult, err error)
type GenericResult ¶
type GenericResult struct {
Status string `json:"status"`
}
type GetScrobblesResult ¶
type GetScrobblesResult struct { GenericResult List []Scrobble `json:"list"` Pagination Pagination `json:"pagination"` }
type MalojaApiBackend ¶
type MalojaApiBackend struct {
// contains filtered or unexported fields
}
func (*MalojaApiBackend) ExportListens ¶
func (b *MalojaApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.Progress)
func (*MalojaApiBackend) FinishImport ¶
func (b *MalojaApiBackend) FinishImport() error
func (*MalojaApiBackend) FromConfig ¶
func (b *MalojaApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
func (*MalojaApiBackend) ImportListens ¶
func (b *MalojaApiBackend) ImportListens(export models.ListensResult, importResult models.ImportResult, progress chan models.Progress) (models.ImportResult, error)
func (*MalojaApiBackend) Name ¶
func (b *MalojaApiBackend) Name() string
func (*MalojaApiBackend) Options ¶ added in v0.3.0
func (b *MalojaApiBackend) Options() []models.BackendOption
func (*MalojaApiBackend) StartImport ¶
func (b *MalojaApiBackend) StartImport() error
type NewScrobble ¶
type NewScrobble struct { Key string `json:"key"` Artist string `json:"artist,omitempty"` Artists []string `json:"artists,omitempty"` Title string `json:"title"` Album string `json:"album,omitempty"` AlbumArtists []string `json:"albumartists,omitempty"` Duration int64 `json:"duration,omitempty"` Length int64 `json:"length,omitempty"` Time int64 `json:"time,omitempty"` Nofix bool `json:"nofix,omitempty"` }
type NewScrobbleResult ¶
type NewScrobbleResult struct { GenericResult Track Track `json:"track"` Description string `json:"desc"` Error Error `json:"error"` }