OpenCollective plugin

Hi all,
I would really love to participate in GSoC 2017 for Discourse. I believe that the plugin for integrating OpenCollective is a very crucial project for this community. I have been in this community from last year and i have a fair understanding about the discourse code base .I am currently researching about Open Collective’s api and the platform. I like to discuss more on this topic on this conversation. :slight_smile: I’m really excited about this project.I already started chatting about the api usage in open collective’s slack.

3 Likes

Hi all,
For past few days, i made few sample plugins and studied “Open Collective” API. I had a chat with their team and, they were very happy to extend their API as per out request. But first I need to clarify few things about the plugin.
I think there are two possibilities to retrieve data,

  • Storing sites’ backers and sponsors in a Discourse database and updating the data within some time interval

  • Constantly retrieving data from their API endpoints real time.

But the issue is will it slow down the overall performance. At the moment we can only retrieve only the complete list of backers and sponsors for a certain organization. @erlend_sh @sam can you please present your views on this matter. Thank you :slight_smile: . It’s always so cool to work here.

2 Likes

You should always cache data like that locally.

We have the class PluginStore, a Key-Value that will help you on that.

Use a Sidekiq job, that will be triggered each N hours, and will sync all the necessary data.

Example:

https://github.com/discourse/discourse-slack-official/blob/master/plugin.rb#L333-L337

EDIT: I took a look at Open Collective API last week, and it has pretty much all we need, except that only usernames (and optional website) identify users, and we would need emails.

5 Likes

hi @Falco,
This is exactly what i was looking for. I will use a Sidekiq job. Yeah the other problem that occured to me was mapping open collective accounts with discourse accounts. I will ask from their team whether they can provide emails of their users through the API. Thank you a lot :slight_smile:

Hi,
Is there any plugins made for discourse that uses sidekiq jobs?

The same plugin I used as an example above uses jobs: https://github.com/discourse/discourse-slack-official

PushNotifications too: https://github.com/discourse/discourse-push-notifications/blob/master/plugin.rb#L80-L100

Translator: https://github.com/discourse/discourse-translator/blob/master/plugin.rb#L61-L78

6 Likes

Thank you @Falco :slight_smile:

Hi,
I finished the basic implementations of the OpenCollective Plugin for Discourse. Now it caches the list of sponsors for a particular collective every two seconds (I used 2 seconds for testing purpose) through a sidekiq job and it shows the list of sponsors in the admin interface /admin/plugins/opencollective .

Can you please take a look at the repo. It’s available on : https://github.com/sudaraka94/discourse-opencollective-plugin

2 Likes

I wrote the plugin in a hurry and few styles has to be added. I created it for demonstration purpose. :slight_smile:

Open Collective Team is willing to provide access to the user emails through their API :slight_smile:

3 Likes

Hi,
I submitted my project proposal for Google Summer of Code 2017. Thank you for all the support you gave me. I learned a lot . If I get selected , I will do my best to make it a success :slight_smile:

1 Like

Hi all,
I was able to get a test collective and an a token for my testing purposes from open collective. :slight_smile:

3 Likes

Very Great and very important job.

1 Like

Thank you @xiasummer :slight_smile: The plugin will be available soon.

Hi all,
I just finished the plugin with granting functionality .

The users are mapped based on their emails. Currently I have defined just a single badge. my repo can be found on https://github.com/sudaraka94/opencollective-plugin.git

4 Likes