Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Add Collection detail to audio #44

Open
reyraa opened this issue Jan 14, 2023 · 0 comments
Open

Add Collection detail to audio #44

reyraa opened this issue Jan 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@reyraa
Copy link
Member

reyraa commented Jan 14, 2023

Each audio should include collection details to display in client. At the moment we only return collection ID. We should add an object that includes collection details.
The response of the audio endpoints should include the corresponding collection information. And the response of the collections endpoints, should include the list of audios as audio objects.

Here is a sample response of the audios endpoints:

{
  "status": "success",
  "data": [
    {
      "genre": [
        22
      ],
      "createdAt": "2023-01-24T00:11:31.796Z",
      "_id": "63cf23365a766d197410519c",
      "name": "La Bella",
      "releaseYear": 2023,
      "fit": [],
      "collectionID": "477569746172697374614d7220536d697468",
      "collection": {
        // "audios": [], // Remember, this should not be returned
        "createdAt": "2023-01-23T23:30:25.201Z",
        "_id": "63cf1bcb6b4ee3104c53b1c3",
        "name": "Guitarista",
        "releaseYear": 2022,
        "collectionType": 1,
        "coverSignature": "0775fac6aab1aa04047e48dda43953238dd8fb97ccd9cdda63517d0a145abfa6a5306bf22157d4e9189222d82162fbf5cbf72e06f615a276bf1ceee4efe44505",
        "coverHash": "9b93181a4ee02d618c1e1861fa2acfad",
        "creatorAddress": "lskhqy429nwm2tew3j5j29ef6pguyynf6jxcmgrh2",
        "collectionID": "477569746172697374614d7220536d697468",
        "__v": 0
      },
      "audioSignature": "84ad10615c485b4eeac51761e9040f2e867cd47be98758b121ec12cc3e70521c7060e3f83ad8e638935e8ff2fc67342f038872f1f37fa98473f6dd477b3c8604",
      "audioHash": "431d7f2536d7d3fa5cc6507227a444b5",
      "creatorAddress": "lskhqy429nwm2tew3j5j29ef6pguyynf6jxcmgrh2",
      "audioID": "4c612042656c6c614d7220536d697468",
      "__v": 0
    }
  ]
}

Sample response of the collections endpoint:

{
  "status": "success",
  "data": [
    {
      "audios": [{
        "genre": [
          22
        ],
        "createdAt": "2023-01-24T00:11:31.796Z",
        "_id": "63cf23365a766d197410519c",
        "name": "La Bella",
        "releaseYear": 2023,
        "fit": [],
        "audioSignature": "84ad10615c485b4eeac51761e9040f2e867cd47be98758b121ec12cc3e70521c7060e3f83ad8e638935e8ff2fc67342f038872f1f37fa98473f6dd477b3c8604",
        "audioHash": "431d7f2536d7d3fa5cc6507227a444b5",
        "creatorAddress": "lskhqy429nwm2tew3j5j29ef6pguyynf6jxcmgrh2",
        "audioID": "4c612042656c6c614d7220536d697468",
        "__v": 0
      }],
      "createdAt": "2023-01-23T23:30:25.201Z",
      "_id": "63cf1bcb6b4ee3104c53b1c3",
      "name": "Guitarista",
      "releaseYear": 2022,
      "collectionType": 1,
      "coverSignature": "0775fac6aab1aa04047e48dda43953238dd8fb97ccd9cdda63517d0a145abfa6a5306bf22157d4e9189222d82162fbf5cbf72e06f615a276bf1ceee4efe44505",
      "coverHash": "9b93181a4ee02d618c1e1861fa2acfad",
      "creatorAddress": "lskhqy429nwm2tew3j5j29ef6pguyynf6jxcmgrh2",
      "collectionID": "477569746172697374614d7220536d697468",
      "__v": 0
    }
  ]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants