Unable to retrieve Catalog Items from Catalog Service in Unity3D SDK

0 votes
Can anyone tell me what is happening here?  Seems like I've been fighting this API for two days.  This is Unity SDK 2.9 runing under Unity 4.5.1f3 in C#.

I want to get my catalog items:

public void GetCatalogItems{

try{

App42Response resp = catalogService.GetItemsCountByCategory("MyCatalog","MyCategory");

int count = resp.GetTotalRecords();  // THIS SHOWS 1 RECORD... YAY

Catalogue cata = catalogService.GetItemsByCategory("MyCatalog","MyCategory");  //API indicates this call returns a Cataogue

// AND YES... I even tried to create the object first Catalogue cata = new Catalogue(); cata = catalogueService.GetItemsByCategory("MyCatalog", "MyCategory");

int count2 = cata.GetTotalRecords(); // THIS SHOWS -1... wtf?????

 

}catch(Exception e){

     Debug.Log("This is incredibly frustrating");

}

}
asked Jun 27, 2014 in App42 Cloud API-BaaS by shawn (25 points)
edited Jun 27, 2014 by shawn

2 Answers

0 votes
 
Best answer

Hi Shawn,

Thanks for writing us.

Firstly, I would like to suggest that you can use our Async API of App42 Unity 3D.

You want to get the total count from Catalogue object which always gives you -1.For finding the total count of record you have to use our GetItemsCountByCategory method.

 

 

answered Jun 28, 2014 by naresh (350 points)
selected Jun 28, 2014 by shawn
Yeah I figured it out... the response returns a json object (string) and I was expecting an actual count of the catalog items since that method was available on that class.  I think I was expecting an actual enumerated list of catalog items.

Thanks for responding Naresh.

Oh and I almost forgot... for anyone looking for the App42 API Docs, they are located at:
http://api.shephertz.com/cloudapidocs/guide/0.8.3/csharp/user_api.html

dont know if those are current or not but they are better than nothing. :)

Dang... I just realized that that link is not the actual class api but just another (older) example page.  Does anyone know where I can see the actual class API docs?  Like this: http://api.shephertz.com/cloudapidocs/docs/ruby/0.8.1.1/App42/Util.html

but for C#?  Member types, method declarations, etc etc etc?  I would be forever grateful.


I think this is it???
http://api.shephertz.com/cloudapidocs/docs/csharp/0.8.3/classcom_1_1shephertz_1_1app42_1_1paas_1_1sdk_1_1csharp_1_1user_1_1_user.html

Woohoo!
Oh Yes Shawn this is our old link please follow the above link which I have given to you. One another request for you if your problem is solved, please select the answer.
Hey Naresh,
I'll give you the mark cause you answered but, with all due respect, begging your pardon and not trying to sound confrontational, the cute little example page you referenced is NOT an API.   :)
0 votes
GetTotalRecords on the catalogue item is misleading.  Rather than calling this a Catalogue, it would have been better to list as just a string.  That would have made sense.  And I suppose a much more valuable answer would be, where is the App42 Class listing... I could have figured this out in two seconds if those API documents existed somewhere?
answered Jun 27, 2014 by shawn (25 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...