Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch events from CoderDojo Zen API #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tpambor
Copy link
Contributor

@tpambor tpambor commented Nov 1, 2016

We are solely using the CoderDojo Zen platform to manage our events. It would make it a lot easier if there is only a single point where time, space etc. is coordinated.

This is currently work in progress and due to Cross-Origin Resource Sharing depends on CoderDojo allowing public access to the API.

Note: Sample output of the API is provided. CORS can be disabled for development until API is public.

The current task list ist:

  • Implement service to fetch the list of events from the Zen API
  • Migrate from current eventlist format to Zen API compatible format
  • Load data using the service
  • Create pull request/issue with request to make the API public and link this PR for reference

@tpambor
Copy link
Contributor Author

tpambor commented Nov 1, 2016

@sunarch As I am new to AngularJS I just assigned you for review purposes. Feel free to unassign.

@sunarch
Copy link

sunarch commented Nov 1, 2016

Nice job, you can merge it.

I will write a modified parser for the new data object format, then we can change the variable for the data source so that the Zen source will be used.

The only thing: it would be better if the list was sorted in ascending order instead of descending order.

(And you could create a repo project, so that the PRs will be organized.)

@tpambor tpambor added this to the zen-api milestone Nov 1, 2016
@tpambor
Copy link
Contributor Author

tpambor commented Nov 1, 2016

I don't like to merge it until we are done and know we are going that way. For the moment we can work in this branch. I think the easiest way is that you make PRs to this branch and I'll merge them then they are also integrated in this PR. I just also created the milestone "zen-api" under which we can group the PRs.

Currently this is blocked on CoderDojo/community-platform#364. There may be other ways we could opt-out if they are not happy with making the API public e.g. a cronjob querying the API and pushing to git.

About the sorting: the query currently works by looking for all events in descending order and then limiting the output to a certain amount. If we would like to have it sorted in ascending order we would need to somehow apply a filter to get the same result. Needs some diging in the code to see if that's possible. But I don't see there a big problem we could either reverse the list or iterate from back to front as we know the size.

@sunarch
Copy link

sunarch commented Nov 1, 2016

Of course you are right to keep it on the separate branch, I wrote that before you added the reference to the API closing issue.

The sorting is no problem at all. If it was possible to do the query in a more specific way, some processing could be left out in our code, but it doesn't make a big difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants