You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by Jason Kristian <ja...@apps4u.com.au> on 2014/11/10 10:27:38 UTC

Re: New PHP SDK

I think this SDK is now ready Ive got all UnitTests done, I think Ive covered all api calls and I have added a Examples folder with detailed examples.
If Ive missed a api or anything please let me know.
 Thanks  and enjoy :)

Jason Kristian | Director | Apps 4 U Pty Ltd.
ph: +61 075699 8109
mob: +61 0411 389 392
e: Jason Kristian <ma...@apps4u.com.au>



> On 21 Oct 2014, at 5:59 pm, jasonk@apps4u.com.au wrote:
> 
> HI Ive made some more changes to this . It now fills in the default app_name and org_name from the constructor but can be over ridden by array of params passed into the Web Client command. Ive also added a OAuth 2 Guzzle plugin so it can be attached to the main Web Client and it will take care of OAuth2 for you so no need to make two calls one to get token then one to make your api call. I think Im going to move it into the main class so its there by default .
> 
> No one has commented on this so Im guessing there is no issue with anyone so I'll be making a pull request in the next day or so to try and get it into the main ApacheUsergrid repo. 
> 
> One thing I do need help on is the license . Ive added the Apache License file and header to all files Ive added the copyright to myself Im not sure if that ok or not from what I read in the contribute doc's I think it is ok.
> 
> 
> 
> 
> October 17 2014 5:07 PM, jasonk@apps4u.com.au wrote: 
>> Ive updated the Manifest files to version 1.0.1 that are now mapped from the APigee Rest endpoints
>> doc rather then the swagger files.
>> 
>> All that is left todo is to hook up the response model classes in the manifest files and finish all
>> the unit tests.
>> And add a event listener to all commands so the system can catch the first command call and get the
>> Oauth 2 token for you so you only need to worry about setting the grant_type in the config file and
>> let the system get the token and set the token for each request.
>> And add any convenance methods to the Response Model classes that make it easier to interact with
>> the return responses.
>> 
>> If anyone thinks there is more to do let me know.
>> 
>> October 16 2014 12:54 PM, "Rod Simpson" <ro...@rodsimpson.com> wrote:
>> 
>>> Jason,
>>> 
>>> This is great. I will look it over tomorrow.
>>> 
>>> Thanks!
>>> 
>>> Rod
>>> 
>>> --
>>> Rod Simpson
>>> @rockerston
>>> rodsimpson.com
>>> 
>>> On October 15, 2014 at 8:24:27 PM, jasonk@apps4u.com.au (jasonk@apps4u.com.au) wrote:
>>> 
>>> HI to all, Sorry for starting new thread Ive can not find the other one Ive started ..
>>> Ive created a new PHP Usergrid SDK, using Guzzle web service client . Its able to interact with
>> all
>>> api end points, Management , Application , Organisation API. It has versioned web service
>>> descriptors (like swagger schemas) so going forward its easier to maintain and update. Its Also
>> has
>>> a Facade feature so It can be called using a static method call just like AWS SDK, It also has a
>>> Laravel Framework Service Provider and a Native service provider so its can be used without any
>>> framework but it will work out of the box with all modern php frameworks that use Service
>> Providers
>>> or IoC containers like, Symfony 2, Laravel, Slix . But just to be clear its framework agnostic so
>>> will work with all projects ..
>>> Example usage :
>>> Usergrid::Management->getOrgs();
>>> Usergrid::Application->getEntity();
>>> Usergrid::Notification->toDevices();
>>> I would appreciate any feed back at all and please fork share and enjoy its not 100% ready but
>> its
>>> 95% done.
>>> https://apps4u@bitbucket.org/apps4u/apache-usergrid.git


Re: New PHP SDK

Posted by Jason Kristian <ja...@apps4u.com.au>.
Im happy that its accepted and that I could contribute. Ive got one feature more I’m going to add and submit its just some helper methods for the default relationships where  there is a relationship api call already.  What I’ve done in my project was make it a bit easier at the moment once you have say a User you get his uuid then use it with a few other params to request the the devices  relationship but once you have a user we (the SDK) already has all the data that is required to make the relationship api call to get the related collections, e.g. devices, groups, followings etc. so now once you have the User you can just ask for its devices and the SDK will make the relationship API call  for you , So this is just a convenance methods but its cleaner and easier to just do $user->devices() as a method on the User response model ..  And I’l keep watch and fix and issues that some one might have it is well tested and in use by me already so I don’t think there will be any but I’ll keep watch just the same.

Thanks Rob I’m glad to help.

Jason Kristian | Director | Apps 4 U Pty Ltd.
ph: +61 075699 8109
mob: +61 0411 389 392
e: Jason Kristian <ma...@apps4u.com.au>



> On 13 Nov 2014, at 2:21 am, Rod Simpson <ro...@rodsimpson.com> wrote:
> 
> Jason,
> 
> Thank you very much for all your hard work.  We sincerely appreciate your contribution.  I have accepted this PR into the project and it is now part of Apache Usergrid.
> 
> Rod
> 
> 
> -- 
> Rod Simpson
> @rockerston
> rodsimpson.com
> 
> On November 10, 2014 at 2:30:19 AM, Jason Kristian (jasonk@apps4u.com.au) wrote:
> 
> I think this SDK is now ready Ive got all UnitTests done, I think Ive covered all api calls and I have added a Examples folder with detailed examples.  
> If Ive missed a api or anything please let me know.  
> Thanks and enjoy :)  
> 
> Jason Kristian | Director | Apps 4 U Pty Ltd.  
> ph: +61 075699 8109  
> mob: +61 0411 389 392  
> e: Jason Kristian <ma...@apps4u.com.au>  
> 
> 
> 
>> On 21 Oct 2014, at 5:59 pm, jasonk@apps4u.com.au wrote:  
>> 
>> HI Ive made some more changes to this . It now fills in the default app_name and org_name from the constructor but can be over ridden by array of params passed into the Web Client command. Ive also added a OAuth 2 Guzzle plugin so it can be attached to the main Web Client and it will take care of OAuth2 for you so no need to make two calls one to get token then one to make your api call. I think Im going to move it into the main class so its there by default .  
>> 
>> No one has commented on this so Im guessing there is no issue with anyone so I'll be making a pull request in the next day or so to try and get it into the main ApacheUsergrid repo.  
>> 
>> One thing I do need help on is the license . Ive added the Apache License file and header to all files Ive added the copyright to myself Im not sure if that ok or not from what I read in the contribute doc's I think it is ok.  
>> 
>> 
>> 
>> 
>> October 17 2014 5:07 PM, jasonk@apps4u.com.au wrote:  
>>> Ive updated the Manifest files to version 1.0.1 that are now mapped from the APigee Rest endpoints  
>>> doc rather then the swagger files.  
>>> 
>>> All that is left todo is to hook up the response model classes in the manifest files and finish all  
>>> the unit tests.  
>>> And add a event listener to all commands so the system can catch the first command call and get the  
>>> Oauth 2 token for you so you only need to worry about setting the grant_type in the config file and  
>>> let the system get the token and set the token for each request.  
>>> And add any convenance methods to the Response Model classes that make it easier to interact with  
>>> the return responses.  
>>> 
>>> If anyone thinks there is more to do let me know.  
>>> 
>>> October 16 2014 12:54 PM, "Rod Simpson" <ro...@rodsimpson.com> wrote:  
>>> 
>>>> Jason,  
>>>> 
>>>> This is great. I will look it over tomorrow.  
>>>> 
>>>> Thanks!  
>>>> 
>>>> Rod  
>>>> 
>>>> --  
>>>> Rod Simpson  
>>>> @rockerston  
>>>> rodsimpson.com  
>>>> 
>>>> On October 15, 2014 at 8:24:27 PM, jasonk@apps4u.com.au (jasonk@apps4u.com.au) wrote:  
>>>> 
>>>> HI to all, Sorry for starting new thread Ive can not find the other one Ive started ..  
>>>> Ive created a new PHP Usergrid SDK, using Guzzle web service client . Its able to interact with  
>>> all  
>>>> api end points, Management , Application , Organisation API. It has versioned web service  
>>>> descriptors (like swagger schemas) so going forward its easier to maintain and update. Its Also  
>>> has  
>>>> a Facade feature so It can be called using a static method call just like AWS SDK, It also has a  
>>>> Laravel Framework Service Provider and a Native service provider so its can be used without any  
>>>> framework but it will work out of the box with all modern php frameworks that use Service  
>>> Providers  
>>>> or IoC containers like, Symfony 2, Laravel, Slix . But just to be clear its framework agnostic so  
>>>> will work with all projects ..  
>>>> Example usage :  
>>>> Usergrid::Management->getOrgs();  
>>>> Usergrid::Application->getEntity();  
>>>> Usergrid::Notification->toDevices();  
>>>> I would appreciate any feed back at all and please fork share and enjoy its not 100% ready but  
>>> its  
>>>> 95% done.  
>>>> https://apps4u@bitbucket.org/apps4u/apache-usergrid.git  
> 


Re: New PHP SDK

Posted by Rod Simpson <ro...@rodsimpson.com>.
Jason,

Thank you very much for all your hard work.  We sincerely appreciate your contribution.  I have accepted this PR into the project and it is now part of Apache Usergrid.

Rod


-- 
Rod Simpson
@rockerston
rodsimpson.com

On November 10, 2014 at 2:30:19 AM, Jason Kristian (jasonk@apps4u.com.au) wrote:

I think this SDK is now ready Ive got all UnitTests done, I think Ive covered all api calls and I have added a Examples folder with detailed examples.  
If Ive missed a api or anything please let me know.  
Thanks and enjoy :)  

Jason Kristian | Director | Apps 4 U Pty Ltd.  
ph: +61 075699 8109  
mob: +61 0411 389 392  
e: Jason Kristian <ma...@apps4u.com.au>  



> On 21 Oct 2014, at 5:59 pm, jasonk@apps4u.com.au wrote:  
>  
> HI Ive made some more changes to this . It now fills in the default app_name and org_name from the constructor but can be over ridden by array of params passed into the Web Client command. Ive also added a OAuth 2 Guzzle plugin so it can be attached to the main Web Client and it will take care of OAuth2 for you so no need to make two calls one to get token then one to make your api call. I think Im going to move it into the main class so its there by default .  
>  
> No one has commented on this so Im guessing there is no issue with anyone so I'll be making a pull request in the next day or so to try and get it into the main ApacheUsergrid repo.  
>  
> One thing I do need help on is the license . Ive added the Apache License file and header to all files Ive added the copyright to myself Im not sure if that ok or not from what I read in the contribute doc's I think it is ok.  
>  
>  
>  
>  
> October 17 2014 5:07 PM, jasonk@apps4u.com.au wrote:  
>> Ive updated the Manifest files to version 1.0.1 that are now mapped from the APigee Rest endpoints  
>> doc rather then the swagger files.  
>>  
>> All that is left todo is to hook up the response model classes in the manifest files and finish all  
>> the unit tests.  
>> And add a event listener to all commands so the system can catch the first command call and get the  
>> Oauth 2 token for you so you only need to worry about setting the grant_type in the config file and  
>> let the system get the token and set the token for each request.  
>> And add any convenance methods to the Response Model classes that make it easier to interact with  
>> the return responses.  
>>  
>> If anyone thinks there is more to do let me know.  
>>  
>> October 16 2014 12:54 PM, "Rod Simpson" <ro...@rodsimpson.com> wrote:  
>>  
>>> Jason,  
>>>  
>>> This is great. I will look it over tomorrow.  
>>>  
>>> Thanks!  
>>>  
>>> Rod  
>>>  
>>> --  
>>> Rod Simpson  
>>> @rockerston  
>>> rodsimpson.com  
>>>  
>>> On October 15, 2014 at 8:24:27 PM, jasonk@apps4u.com.au (jasonk@apps4u.com.au) wrote:  
>>>  
>>> HI to all, Sorry for starting new thread Ive can not find the other one Ive started ..  
>>> Ive created a new PHP Usergrid SDK, using Guzzle web service client . Its able to interact with  
>> all  
>>> api end points, Management , Application , Organisation API. It has versioned web service  
>>> descriptors (like swagger schemas) so going forward its easier to maintain and update. Its Also  
>> has  
>>> a Facade feature so It can be called using a static method call just like AWS SDK, It also has a  
>>> Laravel Framework Service Provider and a Native service provider so its can be used without any  
>>> framework but it will work out of the box with all modern php frameworks that use Service  
>> Providers  
>>> or IoC containers like, Symfony 2, Laravel, Slix . But just to be clear its framework agnostic so  
>>> will work with all projects ..  
>>> Example usage :  
>>> Usergrid::Management->getOrgs();  
>>> Usergrid::Application->getEntity();  
>>> Usergrid::Notification->toDevices();  
>>> I would appreciate any feed back at all and please fork share and enjoy its not 100% ready but  
>> its  
>>> 95% done.  
>>> https://apps4u@bitbucket.org/apps4u/apache-usergrid.git