Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mechanism to batch hide/unhide items of a user's collection #204

Open
sabjorn opened this issue Dec 4, 2024 · 0 comments
Open

add mechanism to batch hide/unhide items of a user's collection #204

sabjorn opened this issue Dec 4, 2024 · 0 comments

Comments

@sabjorn
Copy link
Owner

sabjorn commented Dec 4, 2024

To hide/unhide an item in a collection, each item has to be individually clicked on. The simplest form form of this feature would be to hide/unhide the whole collection at once.

A more elaborate mechanism would be to allow users to click on a checkbox for each item and run against that.

example code for hide/unhide:

fetch("https://bandcamp.com/api/collectionowner/1/hide_unhide_item", {
  "headers": {
    "accept": "*/*",
    "accept-language": "en-US,en;q=0.9,ar;q=0.8",
    "cache-control": "no-cache",
    "content-type": "application/json",
    "pragma": "no-cache",
    "priority": "u=1, i",
    "sec-ch-ua": "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"Not?A_Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"macOS\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "x-requested-with": "XMLHttpRequest"
  },
  "referrer": "https://bandcamp.com/dataist",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"fan_id\":896389,\"item_type\":\"track\",\"item_id\":2976775980,\"action\":\"unhide\",\"collection_index\":null,\"crumb\":\"|api/collectionowner/1/hide_unhide_item|1733202597|ch0AT2tBeFmbL/wH1mm77TFC2TI=\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});```

notice the 'action' is `unhide` -- hide is `hide`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant