fossasia / open-event

Open Event Project, Samples, Documentation and Artwork http://open-event-dev.herokuapp.com
GNU General Public License v3.0
1.71k stars 175 forks source link

Add support of Open Event JSON to Giggity #56

Closed mariobehling closed 7 years ago

mariobehling commented 8 years ago

The repo of Giggity is here https://github.com/Wilm0r/giggity. Sample docs of the Open Event files are here https://github.com/fossasia/open-event/tree/master/sample

the-dagger commented 8 years ago

@mariobehling @aayusharora I would also like to work on this, if its ok with you.

the-dagger commented 8 years ago

@mariobehling If I understood the issue correctly, we have to modify our sample json according to the json structure of Giggity and send a Pull request to their repo right? In this way, their Android App will allow people to browse through the details of EHealth, OTS16 and FOSSASIA16. Am i correct?

aayusharora commented 8 years ago

@dagger I guess you are right. I understand the same by this.

mariobehling commented 8 years ago

If you look at Giggity, it supports different formats. The goal is not to change our JSON. The goal is to enable Giggity to read our format. Implement support of our format in Giggity. Create a fork and make a pull request to Giggity.

the-dagger commented 8 years ago

@aayusharora @mariobehling I just checked their source code. They don't have a JSON parser yet in their app and are currently parsing only xcal/Pentabarf/frab XML schedules.

the-dagger commented 8 years ago

To implement support for our JSON files,we will have to modify their networking code and add json parsing support. https://github.com/Wilm0r/giggity/blob/master/app/src/main/java/net/gaast/giggity/Schedule.java#L292 Here is the specific method where we need it to recognize JSON and then parse it accordingly. We can start off by adding an else if block before the final else block to detect if the input is a json. This can be done simply by checking if the input starts with [ { which is the format for our JSON files as of now. Next up, create a method named loadJson which loops over this json and stores the keys to an Arraylist from which the contents can be extracted and assigned to the UI elements.

siddhantbajaj commented 8 years ago

@mariobehling @the-dagger @aayusharora can i take up this issue?

the-dagger commented 8 years ago

@siddhantbajaj Sure, go ahead

siddhantbajaj commented 8 years ago

I've solved this issue. @the-dagger can you please review the changes , After which I'll make a pull request. https://github.com/siddhantbajaj/giggity/blob/master/app/src/main/java/net/gaast/giggity/Schedule.java

the-dagger commented 8 years ago

@siddhantbajaj Looks good to me. One thing though, if there are no links associated to an event, set the link as http://fossasia.org/ rather than keeping it as null. screenshot-area-2016-08-05-233822

mariobehling commented 8 years ago

On this screen I can see that there is no spacing to the left and right. Also if there is not link there should not be any field "links" and there should not be "null".

mariobehling commented 8 years ago

I wonder if this app needs more improvements. Well, let's go step by step.

the-dagger commented 8 years ago

@mariobehling Agreed. @siddhantbajaj Send a separate PR which addresses these issues as well as this is common to all the json links and not just ours.

siddhantbajaj commented 8 years ago

@mariobehling @the-dagger Yes, this app needs a lot of improvement in UI. I'll fix the above issues and will send a separate PR for other issues.

scandindian commented 7 years ago

@mariobehling @the-dagger Added support to Giggity, find the merged pull request here https://github.com/Wilm0r/giggity/pull/15 . Should we close this issue?