Jump to content

Ancestor query How to do it?


boutzo

Recommended Posts

I'm sorry to ask these silly questions.  But I'm having trouble translating the examples from the swagger ui to actual c# code.  Is there some documentation that will translate.

 

 

Basically what it says.  How can I do it?  Its only 2 parameters but what type of query is it?

 

Do you do an item query and then do a foreach on the baseitemdto to get the parameters you're looking for?

 

I have an episode id and I need to get the series ID from it.  An episode query does not have that parameter.

Edited by boutzo
Link to comment
Share on other sites

Cheesegeezer

I'm sorry to ask these silly questions.  But I'm having trouble translating the examples from the swagger ui to actual c# code.  Is there some documentation that will translate.

 

 

Basically what it says.  How can I do it?  Its only 2 parameters but what type of query is it?

 

 

JSON

 

is that what you're after?

Link to comment
Share on other sites

I know the strings are in JSON format its the formatting of the c# code.  Swagger only shows the parameters the url string and the response body none of the underlying code beneath. Do you just send an itemQuery about a file and will the baseItemDto pretty much give you anything you want to know about a file?

Edited by boutzo
Link to comment
Share on other sites

Angelblue05

@@boutzo I'm not sure I fully understand your question, but you can do a JSON Get request /Items?Ids=EpisodeId. The JSON response will return the baseItemDto list that includes the SeriesId by default.

 

It will look something like this:

 

54af0f1c004ba_UpcomingHelp.jpg

 

Again, I'm not sure I fully understand what you are looking for. I hope this help somehow... :)

Edited by Angelblue05
Link to comment
Share on other sites

I know I can type that into a browser and get that response.  But I was trying to get that same response in c# with an item query.  I since figured it out and got it working.

 

I guess the question should have been,

 

"What is the work flow of obtaining different parameters ?"

 

I came up with this.

 

ItemQuery -> go through BaseItemDto and choose the params I need, store them into a variable, do work.

 

Thanks

Edited by boutzo
Link to comment
Share on other sites

The real correct answer is to use a Json serializer and deserialize those objects into proper c# classes.

 

Again, if you use the ApiClient provided for .net it will do all of this for you...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...