|
Sure! Here's what I'm doing.
Check to see if Catalog has been created:
send GET request: http://developer.echonest.com/api/v4/catalog/profile?format=json&api_key=xxx&name=test-12
Response:{"response": {"status": {"version": "4.2", "code": 5, "message": "This catalog does not exist"}}}
Create catalog:
send POST request: http://developer.echonest.com/api/v4/catalog/create
POSTVARS: format=json&api_key=xxx&name=test-12&type=artist
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "type": "artist", "name": "test-12", "id": "CAKFWCZ1332C5836CD"}}
Search for artist IDs:
send GET request: http://developer.echonest.com/api/v4/artist/search?format=json&api_key=xxx&name=U2
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "artists": [{"name": "U2", "id": "ARUJ5A41187FB3F5F1"}]}}
send GET request: http://developer.echonest.com/api/v4/artist/search?format=json&api_key=xxx&name=Barry+Manilow
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "artists": [{"name": "Barry Manilow", "id": "ARVZDOM1187B9B49C9"}]}}
send GET request: http://developer.echonest.com/api/v4/artist/search?format=json&api_key=xxx&name=Adele
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "artists": [{"name": "Adele", "id": "AR7J9AP1187FB5BD64"}]}}
send GET request: http://developer.echonest.com/api/v4/artist/search?format=json&api_key=xxx&name=Katy+Perry
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "artists": [{"name": "Katy Perry", "id": "AR0IVTL1187B9AD520"}]}}
Send a catalog update:
send POST request: http://developer.echonest.com/api/v4/catalog/update
POSTVARS: format=json&api_key=xxx&id=CAKFWCZ1332C5836CD&data=%5B%7B%22action%22%3A%22update%22%2C%22item%22%3A%7B%22item_id%22%3A%22ARUJ5A41187FB3F5F1%22%2C%22favorite%22%3Atrue%7D%7D%2C%7B%22action%22%3A%22update%22%2C%22item%22%3A%7B%22item_id%22%3A%22ARVZDOM1187B9B49C9%22%2C%22favorite%22%3Atrue%7D%7D%2C%7B%22action%22%3A%22update%22%2C%22item%22%3A%7B%22item_id%22%3A%22AR7J9AP1187FB5BD64%22%2C%22favorite%22%3Atrue%7D%7D%2C%7B%22action%22%3A%22update%22%2C%22item%22%3A%7B%22item_id%22%3A%22AR0IVTL1187B9AD520%22%2C%22favorite%22%3Atrue%7D%7D%5D&data_type=json
DATA: [{"action":"update","item":{"item_id":"ARUJ5A41187FB3F5F1","favorite":true}},{"action":"update","item":{"item_id":"ARVZDOM1187B9B49C9","favorite":true}},{"action":"update","item":{"item_id":"AR7J9AP1187FB5BD64","favorite":true}},{"action":"update","item":{"item_id":"AR0IVTL1187B9AD520","favorite":true}}]
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "ticket": "CAKFWCZ1332C5836CD524EDAC1F01845"}}
Load the profile by name:
send GET request: http://developer.echonest.com/api/v4/catalog/profile?format=json&api_key=xxx&name=test-12
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "catalog": {"resolved": 0, "pending_tickets": [], "name": "test-12", "total": 4, "type": "artist", "id": "CAKFWCZ1332C5836CD"}}}
Request read:
send GET request: http://developer.echonest.com/api/v4/catalog/read?format=json&api_key=xxx&id=CAKFWCZ1332C5836CD&results=15&start=0&bucket=news
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "catalog": {"start": 0, "total": 4, "name": "test-12", "items": [], "type": "artist", "id": "CAKFWCZ1332C5836CD"}}}
Request feed:
send GET request: http://developer.echonest.com/api/v4/catalog/read?format=json&api_key=xxx&id=CAKFWCZ1332C5836CD&results=15&start=0&bucket=news
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "catalog": {"start": 0, "total": 4, "name": "test-12", "items": [], "type": "artist", "id": "CAKFWCZ1332C5836CD"}}}
Make Another request:
Check to see if Catalog has been created:
send GET request: http://developer.echonest.com/api/v4/catalog/profile?format=json&api_key=xxx&name=test-12
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "catalog": {"resolved": 0, "pending_tickets": [], "name": "test-12", "total": 4, "type": "artist", "id": "CAKFWCZ1332C5836CD"}}}
Request read:
send GET request: http://developer.echonest.com/api/v4/catalog/read?format=json&api_key=xxx&id=CAKFWCZ1332C5836CD&results=15&start=0&bucket=news
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "catalog": {"start": 0, "total": 4, "name": "test-12", "items": [], "type": "artist", "id": "CAKFWCZ1332C5836CD"}}}
Request feed:
send GET request: http://developer.echonest.com/api/v4/catalog/read?format=json&api_key=xxx&id=CAKFWCZ1332C5836CD&results=15&start=0&bucket=news
Response:{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "catalog": {"start": 0, "total": 4, "name": "test-12", "items": [], "type": "artist", "id": "CAKFWCZ1332C5836CD"}}}
Please let me know if there's something I missed!
(On an unrelated note, is there any way to make my username in the forum just the first part of my email?)
|