[WIP] music platform user data scraper
teal-fm atproto
31
fork

Configure Feed

Select the types of activity you want to include in your feed.

move json lexicon definitions to lexicons

-252
-82
api/feed/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "fm.teal.alpha.feed.defs", 4 - "description": "This lexicon is in a not officially released state. It is subject to change. | Misc. items related to feeds.", 5 - "defs": { 6 - "playView": { 7 - "type": "object", 8 - "required": ["trackName", "artistNames"], 9 - "properties": { 10 - "trackName": { 11 - "type": "string", 12 - "minLength": 1, 13 - "maxLength": 256, 14 - "maxGraphemes": 2560, 15 - "description": "The name of the track" 16 - }, 17 - "trackMbId": { 18 - "type": "string", 19 - "description": "The Musicbrainz ID of the track" 20 - }, 21 - "recordingMbId": { 22 - "type": "string", 23 - "description": "The Musicbrainz recording ID of the track" 24 - }, 25 - "duration": { 26 - "type": "integer", 27 - "description": "The length of the track in seconds" 28 - }, 29 - "artistNames": { 30 - "type": "array", 31 - "items": { 32 - "type": "string", 33 - "minLength": 1, 34 - "maxLength": 256, 35 - "maxGraphemes": 2560 36 - }, 37 - "description": "Array of artist names in order of original appearance." 38 - }, 39 - "artistMbIds": { 40 - "type": "array", 41 - "items": { 42 - "type": "string" 43 - }, 44 - "description": "Array of Musicbrainz artist IDs" 45 - }, 46 - "releaseName": { 47 - "type": "string", 48 - "maxLength": 256, 49 - "maxGraphemes": 2560, 50 - "description": "The name of the release/album" 51 - }, 52 - "releaseMbId": { 53 - "type": "string", 54 - "description": "The Musicbrainz release ID" 55 - }, 56 - "isrc": { 57 - "type": "string", 58 - "description": "The ISRC code associated with the recording" 59 - }, 60 - "originUrl": { 61 - "type": "string", 62 - "description": "The URL associated with this track" 63 - }, 64 - "musicServiceBaseDomain": { 65 - "type": "string", 66 - "description": "The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. Defaults to 'local' if not provided." 67 - }, 68 - "submissionClientAgent": { 69 - "type": "string", 70 - "maxLength": 256, 71 - "maxGraphemes": 2560, 72 - "description": "A user-agent style string specifying the user agent. e.g. tealtracker/0.0.1b (Linux; Android 13; SM-A715F). Defaults to 'manual/unknown' if not provided." 73 - }, 74 - "playedTime": { 75 - "type": "string", 76 - "format": "datetime", 77 - "description": "The unix timestamp of when the track was played" 78 - } 79 - } 80 - } 81 - } 82 - }
-45
api/feed/getActorFeed.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "fm.teal.alpha.feed.getActorFeed", 4 - "description": "This lexicon is in a not officially released state. It is subject to change. | Retrieves multiple plays from the index or via an author's DID.", 5 - "defs": { 6 - "main": { 7 - "type": "query", 8 - "parameters": { 9 - "type": "params", 10 - "required": ["authorDID"], 11 - "properties": { 12 - "authorDID": { 13 - "type": "string", 14 - "format": "at-identifier", 15 - "description": "The author's DID for the play" 16 - }, 17 - "cursor": { 18 - "type": "string", 19 - "description": "The cursor to start the query from" 20 - }, 21 - "limit": { 22 - "type": "integer", 23 - "description": "The upper limit of tracks to get per request. Default is 20, max is 50." 24 - } 25 - } 26 - }, 27 - "output": { 28 - "encoding": "application/json", 29 - "schema": { 30 - "type": "object", 31 - "required": ["plays"], 32 - "properties": { 33 - "plays": { 34 - "type": "array", 35 - "items": { 36 - "type": "ref", 37 - "ref": "fm.teal.alpha.feed.defs#playView" 38 - } 39 - } 40 - } 41 - } 42 - } 43 - } 44 - } 45 - }
-38
api/feed/getPlay.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "fm.teal.alpha.feed.getPlay", 4 - "description": "This lexicon is in a not officially released state. It is subject to change. | Retrieves a play given an author DID and record key.", 5 - "defs": { 6 - "main": { 7 - "type": "query", 8 - "parameters": { 9 - "type": "params", 10 - "required": ["authorDID", "rkey"], 11 - "properties": { 12 - "authorDID": { 13 - "type": "string", 14 - "format": "at-identifier", 15 - "description": "The author's DID for the play" 16 - }, 17 - "rkey": { 18 - "type": "string", 19 - "description": "The record key of the play" 20 - } 21 - } 22 - }, 23 - "output": { 24 - "encoding": "application/json", 25 - "schema": { 26 - "type": "object", 27 - "required": ["play"], 28 - "properties": { 29 - "play": { 30 - "type": "ref", 31 - "ref": "fm.teal.alpha.feed.defs#playView" 32 - } 33 - } 34 - } 35 - } 36 - } 37 - } 38 - }
-87
api/feed/play.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "fm.teal.alpha.feed.play", 4 - "description": "This lexicon is in a not officially released state. It is subject to change. | A declaration of a teal.fm play. Plays are submitted as a result of a user listening to a track. Plays should be marked as tracked when a user has listened to the entire track if it's under 2 minutes long, or half of the track's duration up to 4 minutes, whichever is longest.", 5 - "defs": { 6 - "main": { 7 - "type": "record", 8 - "key": "tid", 9 - "record": { 10 - "type": "object", 11 - "required": ["trackName", "artistNames"], 12 - "properties": { 13 - "trackName": { 14 - "type": "string", 15 - "minLength": 1, 16 - "maxLength": 256, 17 - "maxGraphemes": 2560, 18 - "description": "The name of the track" 19 - }, 20 - "trackMbId": { 21 - "type": "string", 22 - 23 - "description": "The Musicbrainz ID of the track" 24 - }, 25 - "recordingMbId": { 26 - "type": "string", 27 - "description": "The Musicbrainz recording ID of the track" 28 - }, 29 - "duration": { 30 - "type": "integer", 31 - "description": "The length of the track in seconds" 32 - }, 33 - "artistNames": { 34 - "type": "array", 35 - "items": { 36 - "type": "string", 37 - "minLength": 1, 38 - "maxLength": 256, 39 - "maxGraphemes": 2560 40 - }, 41 - "description": "Array of artist names in order of original appearance." 42 - }, 43 - "artistMbIds": { 44 - "type": "array", 45 - "items": { 46 - "type": "string" 47 - }, 48 - "description": "Array of Musicbrainz artist IDs" 49 - }, 50 - "releaseName": { 51 - "type": "string", 52 - "maxLength": 256, 53 - "maxGraphemes": 2560, 54 - "description": "The name of the release/album" 55 - }, 56 - "releaseMbId": { 57 - "type": "string", 58 - "description": "The Musicbrainz release ID" 59 - }, 60 - "isrc": { 61 - "type": "string", 62 - "description": "The ISRC code associated with the recording" 63 - }, 64 - "originUrl": { 65 - "type": "string", 66 - "description": "The URL associated with this track" 67 - }, 68 - "musicServiceBaseDomain": { 69 - "type": "string", 70 - "description": "The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. Defaults to 'local' if unavailable or not provided." 71 - }, 72 - "submissionClientAgent": { 73 - "type": "string", 74 - "maxLength": 256, 75 - "maxGraphemes": 2560, 76 - "description": "A metadata string specifying the user agent where the format is `<app-identifier>/<version> (<kernel/OS-base>; <platform/OS-version>; <device-model>)`. If string is provided, only `app-identifier` and `version` are required. `app-identifier` is recommended to be in reverse dns format. Defaults to 'manual/unknown' if unavailable or not provided." 77 - }, 78 - "playedTime": { 79 - "type": "string", 80 - "format": "datetime", 81 - "description": "The unix timestamp of when the track was played" 82 - } 83 - } 84 - } 85 - } 86 - } 87 - }