I made my question clearer in this post: http://stackoverflow.com/questions/4767386/rest-how-to-convert-an-existing-php-library-file-so-it-can-be-used-in-a-cakephp
Maybe it's better for someone to answer... Regards, John Maxim. On Jan 22, 3:28 am, John Maxim <[email protected]> wrote: > Hi everyone, > > I have set up this rest datasource, so now I need to place some > functions which are to: > > 1)Send data to the Rest API > 2)Receive data from the Rest API > > May I know where do I place the dynamic string variables such as, > userid, sessionid, itemid so that it can be sent to to the API which > is currently in the "Send function" ? > > The reason it is dynamic is because, each user view a page, e.g. view/ > 5 by userid=1, item=5: these data are sent to the rest API when they > view that page. I wonder where do these dynamic string variables > functions should be stored? I have the working piece of codes in a non- > cake PHP scripting, I just can’t figure out where to place it in, e.g. > in my Rest Model? the Controller which I want to use to display the > data? or in the Rest datasource? > > Here's what I mean: > > The member's data:(E.g.) > > $itemId = "5"; > $sessionid = "F3D4E3BE31EE3FA069F5434DB7EC2E34"; > $itemdescription = "Chicken Chop"; > $itemurl = "/food/view/5"; > $itemImageurl = "*/sample-image-url.jpg"; > $userid = "24EH17KOMEWKKJNS89"; > $timeRange = "ALL"; > > Send Action: > > $eventReply = sendAction("view", $itemId, $itemdescription ,$itemurl , > $itemimageurl,$sessionid,$userid); > > .... > ... //and other functions > ... > ... > > I have checked out other developers sending to ReST but mostly using > static data. I'm not sure though. (e.g.) Google Analytics, Yahoo or > Flickr, Twitter, which usually allow us to CRUD. But what about > dynamically sending and receiving data ? I'm quite sure it can be done > but nothing much can be read about this. > > Hope someone could clarify this for a bit. Thanks. > > regards, > John Maxim -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
