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 ... 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 30, 2015, 08:19:54 am
Hi tottten,
Thanks for adding the response about civix and naming convention.

Quote
Out of idle curiosity... what's wrong with doing "civix generate:module org.civicrm.osdi" and using the default/convention?

Actually I had developed the people's endpoint page in a file index.php which lies at “/sites/default/ext/org.civicrm.osdi/api/v3/People/” on the camus (remote server).

So Eileen figured out when I was using this path as a link to people's resource on my AEP (API Entry Point) it didn't work because of the dots present in org.civicrm.osdi extension name . Though it does works on my local machine as I am using Apache and didn't work on the camus (remote server) may be because it runs on nginx and has some other configuration, I am exactly not sure about this.

The command "civix generate:module org.civicrm.osdi” works perfectly fine, well I started developing the extension with this only. The problem was because of the path I was using for index.php that didn't work out on camus, so I renamed the extension directory to “osdi” just to make the new path work ie “/sites/default/ext/osdi/api/v3/People/ “

Thanks.
-for the love of code and always learning

Anudit Verma

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: GSoC 2015 : New API : Open Supporter Data Interface (OSDI) Implementation
July 30, 2015, 03:02:58 pm
Thanks.

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
August 02, 2015, 01:40:32 pm
Updates:

This past weekend I worked on providing the limit for returning number of contacts and mapped more fields between CiviCRM and OSDI by including more entities with the help of REST URL(s). Also I tried implementing action control methods (POST, PUT, GET, etc) based on OSDI specification.

In the next project check-in meeting we will discuss about setting up another site for testing data communication between different two OSDI implemented based sites.

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

Anudit Verma

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
August 02, 2015, 08:40:02 pm
Updates:

In today's meeting with Joe McLaughlin we discussed about mapping more fields between OSDI and Civi. We looked at common fields present on OSDI documentation ( here http://opensupporter.github.io/osdi-docs/ ) and discussed on the idea of adopting custom fields in place of those fields which are not present in Civi system.

Also Joe got a response from Jason Rosenbaum of Action Network over setting up the data communication between OSDI spec based servers for performing control actions. So I learned that I have to develop a person-signup helper which is a helper endpoint to aid in the creation of People resources via POST.

So I will now primarily focus on developing the person-signup helper which would allow me to perform these control actions and also I will map more relevant fields between the two systems.

Thanks.
-for the love of code and always learning

Anudit Verma

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
August 04, 2015, 12:44:26 pm
Updates:

I have added the link for person-signup helper having required JSON structure and added the support for POST.
AEP can be accessed here : http://camus.fuzion.co.nz/hal-browser/browser.html#/sites/all/modules/civicrm/extern/osdi.php

I am trying both curl and non-curl methods in php for POST requests. I'll go with the one which would be effective and can be achieved with fewer lines of code.

Also I was looking into HAL-PHP libraries (here https://github.com/mikekelly/hal_specification/wiki/Libraries )for making POST requests but they don't offer much support for POST. PUT, DELETE etc rather they can be well consumed for GET only. So I'll stick to my specified methods and make POST working without using any external dependency or library.
-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
August 04, 2015, 06:40:16 pm
Anudit, thanks. You don't think this library is useful for doing GET, POST, PUT, DELETE - https://github.com/Jmeyering/hal-explorer  ?

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
August 04, 2015, 06:53:55 pm
Thanks Joe, I will look into it. Actually it was authored just few hours ago so it wasn't listed on the libraries page (though it is has been added now) I mentioned in the last update.
« Last Edit: August 04, 2015, 06:58:34 pm by Anudit Verma »
-for the love of code and always learning

Anudit Verma

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
August 06, 2015, 09:13:37 pm
Updates:

Today in the weekly Hangout project check -in meeting with Joe McLaughlin, Eileen, Jason from Action Network and Josh Cohen from OSDI, I presented and reviewed my work done in past couple of weeks. I presented the basic person-sign helper which would allow the user to POST and add the data to people's collection resource. Right now I am currently testing it with CURL for POSTing the data to OSDI API sample-people's collection page and also I would test this on the other CiviCRM site which has been created by Eileen on the same camus server. These testing processes would also serve the purpose for checking the data communication and interoperability between different servers. Given below are the links for accessing these resources I worked on:

AEP: http://camus.fuzion.co.nz/hal-browser/browser.html#/sites/all/modules/civicrm/extern/osdi.php

Person-signup Helper: http://camus.fuzion.co.nz/sites/default/ext/osdi/api/v3/post.php
^This file has been removed from the server as the person-signup helper would not be form rather non-get options provided on the HAL-browser would be utilized for it.

Code on the Github : https://github.com/anuditverma/OSDI-Implementation/blob/master/api/v3/post.php

Next Targets:

I am planning to utilize this coming weekend to create and add a dedicated page for person-sign up helper to my custom extension by using the Civi resources. Further I would work on adding support for DELETE and then PUT.  Also Jason had been advising if I follow these methods in this particular order as “PUT is more complex and probably optional”.

So this weekend I would be engaged for achieving these targets and would report to the team on the daily project-check-in on Monday 7:30am IST
« Last Edit: August 07, 2015, 12:35:07 pm by Anudit Verma »
-for the love of code and always learning

Anudit Verma

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
August 10, 2015, 07:23:07 pm
Updates:

Past couple of days I have been working solving the issues raised by Jason from Action Network on my github repo here https://github.com/anuditverma/OSDI-Implementation/issues .

Joe McLaughlin and Eileen are actively assisting me to get over these issues, I have fixed some of them  but few are still open. I have prioritize these issues as I am currently working on person-sign up helper (ie issue #9) also I am solving other minor issues side by side which would not restrict my flow of work.
-for the love of code and always learning

Anudit Verma

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
August 11, 2015, 11:00:09 pm
Updates:

Developed the person-sign up helper, now currently I am adding receiving endpoints (adding person's record in Civi system first, then will move on to other sites.) I'll push the code to git hub for review.
-for the love of code and always learning

Anudit Verma

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
August 17, 2015, 07:06:57 am
Updates:

After discussing with my mentors Joe McLaughlin and Eileen, I have made a final plan for the coming week which will include reviewing and feedback from whole team,
Here is the timeline for this week:

17 (Mon) - 19 (Wed)
Finalizing POST, DELETE & PUT (if possible, currently it is optional)

20 (Thu)
Testing on different servers. (between Camus, Action Network and local machine)

21 (Fri)
Demo and final review on the weekly Hangout meeting.

22 (Sat) & 23 (Sun)
Weekend will be consumed for scrubbing code, writing tests and improving the documentation before the final submission.
 
24 (Mon)
Final submission

I have started drafting the documentation, will be completed simultaneously as all the other things progresses.

Thanks.
-for the love of code and always learning

Anudit Verma

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
August 17, 2015, 11:37:52 pm
Updates:

Past couple of days I have been conversing with Eileen in an email correspondence about implementing REST calls for POSTing the data in the Civi system. I used var_dump method and checked console logs for getting details about the data posted into the system and checked if civi is blocking the POST requests. But working with REST calls stands ineffective so In today's daily project check-in meeting with Joe McLaughlin and Eileen, after discussing more about POSTing data, I have decided to use PHP method for this functionality and I would be implementing the debug code into it to check its working. Also I am simultaneously working on remaining issues raised on the github repository.
-for the love of code and always learning

Anudit Verma

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
August 19, 2015, 12:44:32 am
Updates:

Yesterday I decided to use PHP method to implement POSTing of data but before employing this method I again looked over my previous code that was utilizing REST API calls. So after some minor debugging and fixes in the code the POST finally works now. Here is the code for person-sign up helper: https://github.com/anuditverma/org.civicrm.osdi/blob/master/api/v3/signup.php

Now I can create a new person's (data according to OSDI specification) resource within my local Civi site and also I am able to POST the data from my local machine to the Civi site hosted on camus server.

Next Targets:
I will now work on adding support for PUT & DELETE and I will continue fixing the remaining issues.
-for the love of code and always learning

Anudit Verma

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
August 21, 2015, 07:17:46 am
Updates:

I have added PUT & DELETE support on the person signup helper's end point but in yesterday's weekly OSDI Tech committee meeting when I discussed these updates with Josh and Jason so they mentioned that PUT & DELETE should be available on the person's endpoint instead of person signup helper's endpoint.

So I have raised this issue on my repository along with few minor issues which will be fixed very soon. On the daily check-in meeting, Joe McLaughlin and I have decided to get a final review on the project from the team members in the next weekly Hangout meeting and of course feedback from the community members are always welcomed and appreciated.
Link to the repository : https://github.com/anuditverma/org.civicrm.osdi

I am looking forward to the next week that will be utilized for finalizing the documentation, project summary and fixes to close the remaining issues.
Thanks.
-for the love of code and always learning

Anudit Verma

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
August 25, 2015, 01:25:37 pm
Updates:

Here is the link to the project repository : https://github.com/anuditverma/org.civicrm.osdi

The person-signup helper with POST requests handling capability is ready now. Also PUT & DELETE support(s) have been added to the person's endpoint and are working fine now.

You could visit this link below to see the live version of this extension, it will open up the API entry point (AEP) from here you can explore the sample data based on OSDI specification residing on the testing (Camus) server.

http://camus.fuzion.co.nz/hal-browser/browser.html#/sites/all/modules/civicrm/extern/osdi.php

On the AEP :
-osdi:person_signup_helper : The person-sign up helper is used to add a new person's record into the system's collection of people.
-osdi:people : This end point is used to explore the collection of people also from here you can update (PUT) or DELETE the record.
-canvasser:brand_logo: The branding logo for use in UI.

Currently only few issues are remaining which would be fixed very soon. I am continuously testing the extension and fixing along few bugs with minor fixes.

-for the love of code and always learning

Anudit Verma

Pages: 1 ... 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.