Recipe Part 4

1 view
Skip to first unread message

Nate

unread,
May 6, 2009, 3:25:57 PM5/6/09
to RTFM: Development for Mobile Devices
Hi all,

The fourth and final part of NURecipe, Part 4, is now formally
assigned. It is due by the start of class next Wednesday, one week
from today. The handout for the assignment, sample code, etc. is
available at the usual place: http://eecs395.ndnichols.com/recipe.php

I will be doing the grocery list part today to see how much of a pain
it is, I will let you know how much combining you need to do.

Also, Office Hours tomorrow are from 1-2 in the Library Lab.

Thanks,
Nate

Jeff Hentschel

unread,
May 8, 2009, 4:48:56 AM5/8/09
to RTFM: Development for Mobile Devices
What's the api for the scoring websites? Also, where are they?

Nathan Nichols

unread,
May 8, 2009, 9:40:08 AM5/8/09
to rtfm-development-...@googlegroups.com
Jeff,

It's in the notes from Wednesday. It's running at ftaires.com, I
think the url is ~3/4 of the way through the presentation.

Nate

Jason Martens

unread,
May 12, 2009, 11:39:08 PM5/12/09
to rtfm-development-...@googlegroups.com
I'm trying to add the web ratings, but it appears that ftaires is not responding.  I tried browsing to:

But I got a 404 "The path '/getScore' was not found."

message.  Thoughts?

Gregory Schmidt

unread,
May 12, 2009, 11:43:05 PM5/12/09
to rtfm-development-...@googlegroups.com
Nate sent out an email a few days ago about how he updated the web service. The new (not in the slides) URL to use


/getScore isn't there anymore. 



Also, here is Nate's original email, for reference.

After Jeff's good suggestion, I improved the web service.

It's setScore now takes a uid key.  This should be the unique id of
the device, which you can get with

NSString *uid = [[UIDevice currentDevice] uniqueIdentifier];

setScore returns either 'ok' or 'fail'  The only way to get 'fail' is
to submit a rating that is not [1, 100].

getScore has now been renamed to getAvgScore.  It returns the average
score for the recipe_id you pass in.  If the system doesn't have any
reviews for that recipe, it returns 50.  (The average score.)

I added getUserScore.  It takes a recipe_id and uid and returns the
most recent rating for that recipe_id from that uid.  If the user
hasn't submitted a score for that recipe, it returns -1.

You are allowed to submit more than one score, they all get included.

Samples:
http://ftaires.com:9000/setScore?recipe_id=42&score=88&uid=nate
http://ftaires.com:9000/getUserScore?recipe_id=42&uid=nate
http://ftaires.com:9000/getAvgScore?recipe_id=42

Please let me know if you have any questions or problems.

Thanks,
Nate
Reply all
Reply to author
Forward
0 new messages