CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
Pages: 1 ... 3 4 [5] 6 7 8

Author Topic: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation  (Read 9573 times)

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 14, 2015, 03:02:11 am
Updates:

In the last project check-in Hangout meeting with the team, I presented the retrieved data from CiviCRM database into OSDI specification (which was having some of the fields reformatted into OSDI based specification). During the meeting Jason did a pull request on the GitHub repository which can be viewed here https://github.com/j-ro/OSDI-Implementation/commit/2c3fbde72ee4312ef0e0f6e23481c307d1e0106c

So over the weekend while working on the custom extension I got in touch with Jason to discuss about the pseudo code he pulled. I learned that I need to present the retrieved data to look something like this http://opensupporter.github.io/osdi-docs/people.html#scenario-retrieving-a-collection-of-person-resources-get

Also with mutual consent we have decided to do a daily project check-in from Monday to Thursday for 15-20 minutes at 7:30am IST (with Joe McLaughlin, Eileen & Joe Murray) which will be followed by regular weekly Hangout check-in meeting with the team on Friday same time for an hour. So overall check-in would be from Monday to Friday.

Next target:

In first daily check-in today, I discussed with Eileen for presenting the data (in JSON representation). She advised me to make use of CiviCRM wrapper for converting the fields into OSDI based by parsing the array through my response function.
Now I will be working on this and catch-up with the team in daily check-in meeting.

Thank you.
« Last Edit: July 14, 2015, 07:29:26 pm by Anudit Verma »
-for the love of code and always learning

Anudit Verma

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 14, 2015, 02:58:18 pm
Anudit - I mean to make your own version of the civicrm_api3_create_success function - since your 'outer formatting' needs to be done in a different way
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 14, 2015, 07:55:29 pm
Updates:

OK-Eileen, I have used civicrm_api3_create_success(args) for returning the array. I will add another wrapper for modifying the field and them to the existing entity file.

In today's meeting I clarified with Eileen about whether I should write a PHP Unit test case or not  as it is one of the requirement for delivering the functionality by the API.

So my next target would be to modify the existing custom API entity including the functions based on CiviCRM architecture to view the data in JSON representation.

Thank you.
-for the love of code and always learning

Anudit Verma

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 14, 2015, 07:57:44 pm
I absolutely advocate writing a unit test - but I think it makes sense to leave that for another week or 2 until you have more tangible results
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 15, 2015, 07:57:12 pm
Updates:

So in today's meeting with Joe McLaughlin I presented the REST URL working in HAL- browser on the gsoc-server which was based on the recent changes that were made in the Get entity file. It can be viewed on GitHub repo here : https://github.com/anuditverma/OSDI-Implementation
Now I am able to retrieve the People's record in JSON representation which looks similar to OSDI's sample data which can be followed here http://opensupporter.github.io/osdi-docs/people.html#scenario-retrieving-a-collection-of-person-resources-get

Next Target:

I will be working on adding links to People's record which can GET the details of each person's record when requested through the HAL-browser implementation.

Thank you.
-for the love of code and always learning

Anudit Verma

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 15, 2015, 08:05:37 pm
Great - sorry I missed today - what's the url people should see output at? Still this?

http://camus.fuzion.co.nz/hal-browser/browser.html#/sites/all/modules/civicrm/extern/osdi.php?entity=People&action=get&json={%22sequential%22:1,%22magicword%22:%22seasme%22}&api_key=9BivcYv1cOT7md6Rxom8Stiz&key=gNhqb5uGUaiLAHrZ
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 16, 2015, 08:31:25 am
Eileen- I have updated the Get.php file on the gsoc-server, so as for now yes this the URL for viewing the People'e record. It has now the proper indenting as of OSDI's sample response code but lacks elements like _links and curies. Also I think I should be working on adding various links on the AEP for accessing People's record etc. So could you brief me more on this whether I have to change the URL for output or something more on my next target on which I am currently working on.
-for the love of code and always learning

Anudit Verma

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 16, 2015, 01:26:21 pm
Hi Anudit,

Based on your reading of the OSDI spec what do you think needs to happen to the URL? It would be good if you outline you you are proposing the next steps would look & terms of url & output & we'll let you know if we have any concerns.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 17, 2015, 02:20:28 am
Updates:

In today's meeting with Joe McLaughlin and Eileen I discussed about the URL that will be inserted at the AEP (API Entry Point) to expose the People's record through the HAL-browser. We discussed about creating AEP that will include endpoints and various URL structures (for eg People's resource).

Also Joe McLaughlin proposed to make a draft having plans for the coming weeks which I believe would be very useful for determining specific targets for project. Now I will be working on creating the AEP and over the weekend I will be sharing the draft with the team which would be finalized by Monday (EST).

Thank you.
-for the love of code and always learning

Anudit Verma

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 17, 2015, 04:29:21 am
Great - what did you get done today after we talked?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 18, 2015, 04:42:50 am
Eileen- I have created the AEP in the osdi.php file, you can view it here http://camus.fuzion.co.nz/hal-browser/browser.html#/sites/all/modules/civicrm/extern/osdi.php

In the last meeting I discussed about the URL for People's resources to be put under links, so few things I have came across which I would like to discuss,

  • When I embedded the complete URL (including keys) in the osdi.php file then the whole code was getting unresponsive as the content under Links and Properties of the HAL-browser disappeared.
  • It does work and shows up the GET links properly when I had shortened the URL but then on clicking the GET button I am not able to view the People's record (unresponsiveness is observed, might be because the URL was shortened by removing the JSON query including the API keys)

So how can I use the shortened URL to get a particular person's record by providing the ID something like /sites/all/modules/civicrm/extern/osdi.php?entity=People&People_id=*any arbitrary ID
and further it would allow me to add more links so that I would get the AEP more functional, allowing to explore the other database records.

Thanks 
-for the love of code and always learning

Anudit Verma

joemcl

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 1
    • Citizen Action of New York
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.6
  • PHP version: Unsure
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 18, 2015, 09:22:04 am
Anudit, thanks for the update. This link works but the GET doesn't show the people info:
http://camus.fuzion.co.nz/hal-browser/browser.html#/sites/all/modules/civicrm/extern/osdi.php?entity=People&action=get


You're trying to get to this kind of result, right, as seen on the OSDI HAL browser page -
http://api.opensupporter.org/hb2/browser.html#http://api.opensupporter.org/api/v1/people




Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 18, 2015, 07:13:27 pm
I went to take a quick look at what you had done on github to see where the urls you asked about were coming from - but it doesn't look like you have committed them yet?

"So how can I use the shortened URL to get a particular person's record by providing the ID something like /sites/all/modules/civicrm/extern/osdi.php?entity=People&People_id=*any arbitrary ID"

I'm not sure if you are asking 'how can I get the HAL browser to use this url' or how do I extract the value in People_id from the url or how do I use that id to filter my call to the contact api (if the latter api explorer is your friend)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Anudit Verma

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 3
  • Budding author of a concise tech blog.
  • CiviCRM version: 4.7
  • CMS version: Drupal 8 , WordPress 4.4.2
  • MySQL version: 5.6.17
  • PHP version: 5.5.9
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 19, 2015, 08:36:11 am
Yes- Exactly this is what I want to do. Sorry, next time onwards I would try to provide more details about my queries.
I am not sure which URL you are asking for committing on Github, do I need to make some configurations so that the People's REST URL would end up having similar links to view People's record as seen on OSDI sample page here http://api.opensupporter.org/hb2/browser.html#http://api.opensupporter.org/api/v1/people
-for the love of code and always learning

Anudit Verma

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 19, 2015, 01:48:09 pm
OK so I *THINK* you are asking about the links per my screen shot.

I was looking in your github so see what you have attempted to figure this out. What does the OSDI spec say about it? From a quick look it seems the links in the links section reflect the links you are returning as _LINKS in your response to the generic 'people' request.

I can't see anything in your github repo so suggest you have added the _LINKS section yet from the spec - but perhaps you have added it locally & not pushed to github? Even if the links aren't working it would be better if you pushed them up to github so we can see where it is you are stuck.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: 1 ... 3 4 [5] 6 7 8
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation

This forum was archived on 2017-11-26.