rhodges 37 Posted February 15, 2016 Share Posted February 15, 2016 I'm running a GetItemsAsync and pulling back movies. I'm then iterating the items and on some I'm setting the DateCreated and calling UpdateItem, but I'm getting "The method or operation is not implemented". Am I doing something wrong with how I'm updating them, or is setting the DateCreated not supported? I'm trying to update the DateAdded (which I was thinking is the same as DateCreated, but maybe not). Link to comment Share on other sites More sharing options...
Luke 37113 Posted February 15, 2016 Share Posted February 15, 2016 i would need to see the log, thanks. Link to comment Share on other sites More sharing options...
rhodges 37 Posted February 15, 2016 Author Share Posted February 15, 2016 There isn't anything in the server log. Maybe I need to turn on debug logging? Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted December 7, 2016 Share Posted December 7, 2016 Though the post is quite old, you're getting the "not implemented" error, because the .Net ApiClient.UpdateItem() method's body raises only a NotImplementedException, because, well the update item functionality is not implemented. I am at a similar point, see here. You cannot update a single field of an item, you have to post the whole item with the field you want to change updated. Basically you have to do what the Javascript code does. See function onSubmit() and submitUpdatedItem() here and updateItem()here. You'll have to pack the item's properties (BaseItemDto args = await client.GetItemAsync(itemId, userid)maybe there is a more suitable type) into a Dictionary<string, string> with key being the property's name and the value being the properties value. This is fine for string values (e.g. "ForcedSortName"), ugly for simple enumerables (e.g. "Keywords") and even uglier for complex enumerables (e.g. "Studios"). I have no idea yet how the dictionary's values should look like for the enumerable values (nor how to generate the dictionary for them from BaseItemDto). It might be an idea to bypass the apiclient's public PostAsync() method, serialise the item to JSON and post the whole thing via apiclient.HttpClient - which would be the same the javascript code does. HTH, sv Link to comment Share on other sites More sharing options...
Luke 37113 Posted December 7, 2016 Share Posted December 7, 2016 Probably, yes. 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