PlutoIsAPlanet 2 Posted November 29, 2023 Share Posted November 29, 2023 Greetings all, first of all just a little gratitude on my part, I recently went ahead and got the Lifetime pass. Keep up the great work I would like to use the API and set the view type i.e. from "Primary" to "List" for any given folder. I thought that I'd use the DisplayPreferencesService to grab the DisplayPreferences object via getDisplaypreferencesById as that object looks promising, as it has some of the properties on display there (view type, sort order, sort by etc.). If I invoke the method, passing on the folder id of the page I want to modify, I get the following back (Insomnia): { "Id": "1a0ae050ab3b21ce1e2e6e360a550352", "RememberIndexing": false, "PrimaryImageHeight": 250, "PrimaryImageWidth": 250, "CustomPrefs": {}, "ScrollDirection": "Horizontal", "ShowBackdrop": true, "RememberSorting": false, "SortOrder": "Ascending" } In Visual Studio I see all of the properties: The idea here is to set the ViewType property to "List" via PostDisplaypreferencesByDisplaypreferencesid. This is where I'm getting stuck. There is no view type assigned even though it is currently Primary. In addition, the client (required for the POST request) is null, so I figure either what I'm trying to achieve is not possible via the API, or I should be passing on something else as the folder id (if so what?!) Any ideas where I'm going wrong? Link to comment Share on other sites More sharing options...
Solution ebr 14921 Posted November 29, 2023 Solution Share Posted November 29, 2023 Hi. The view type is saved per app/user and some of the apps don't use that API to do so - instead using cookie-type data. 1 Link to comment Share on other sites More sharing options...
PlutoIsAPlanet 2 Posted November 30, 2023 Author Share Posted November 30, 2023 15 hours ago, ebr said: Hi. The view type is saved per app/user and some of the apps don't use that API to do so - instead using cookie-type data. Thanks for the info @ebr I saw the differences between a web browser and the android app (primary vs list on the same view for the same user). So just to be clear, there's no way I can accomplish this via the API? If so, is this something that might be allowed in the future by adding the user and app id's as query args? Link to comment Share on other sites More sharing options...
PlutoIsAPlanet 2 Posted November 30, 2023 Author Share Posted November 30, 2023 18 minutes ago, PlutoIsAPlanet said: If so, is this something that might be allowed in the future by adding the user and app id's as query args? My bad, I have just taken another look at the API. You do allow the aforementioned as query args - sorry for the oversight. The only question I have then, is how to retrieve the client (string) in order to pass that on? Link to comment Share on other sites More sharing options...
PlutoIsAPlanet 2 Posted November 30, 2023 Author Share Posted November 30, 2023 I found that I can get this by using the SessionsService. Thanks again for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now