-
Notifications
You must be signed in to change notification settings - Fork 825
Add "Attending" functionality to a User Profile #2327
Comments
Please propose steps about how you will implement this |
@iamareebjamal Like I tend to make two sections in the profile section of the app where , after logging in, it will show the number of already registered attendees and a section where it will allow you to change the status of attending the event or not. All the data can be received using the API. |
I don't think anyone would be interested in knowing who are all the attendees, and my initial request about proposal of implementation was about the fetching of data from API, saving in db and all. What do you propose about that |
@iamareebjamal Actually I meant only the number of attendees will be shown, not all their names as they are not necessary. |
@iamareebjamal Like the stats shown might convince the user to attend the concerned summit and thats why I want to show that in the user profile. |
If the API does not have attendance attribute, then it has no significance to add in the app. Also, did you check the permissions required to get the attendee information from API.
The question is not about conflict but about does a contributor knows what he has to do, i.e, fetch data, whether or not to store in the database, handling authentication and about the roles required in the API. |
@iamareebjamal As far I have planned I thought of receiving the data from the API and then storing it in the RealmDataRepository and then fetching it from there and showing it in the app. But as authentication is coming into picture, things get complex as I realized I am mixing two different things, one is the Attendees part of the API and other is the Users part. Like I cant directly update a variable of a User object. So that initital thought of So, what I propose is that first after the user is logged in with his email id and password, the Attendees data will be fetched by the API and stored in db. The number of attendees will be shown. Now, if the person changes his status to attending, then a search query in the results of the already loaded Attendees in the db will be done. If no same email matches as that is unique, then a POST request will be sent which will thus register him as attending. If a same email id is present then a PATCH request will be sent which will update his status of attending. |
Hmm, loading all attendees in order of magnitudes of 1000s, sometimes millions and saving them in db just to show count seems unnecessary. Secondly, then you are suggesting to operate on that data to find a unique email or something, also unnecessary. The reason to this is that you just need to send PATCH request toggling the status no matter if you are attending or not. But attendee logic is not a boolean at all, an attendee is attendee if it has bought a ticket (or got a free ticket), so there is no boolean field for attending or not AFAIK. The ticket handling is too broad a job for the app and cannot be handled now. And yes this was the reason of me intriguing you to check about permissions, because then you would have wasted that time in solving an issue which couldn't be completed |
@iamareebjamal Pardon me but where do I find in the API about special permissions required ? Just found out that an authorization key was required to post the data. Is that a blocked permission? |
@iamareebjamal No permissions are required to fetch the data. |
That is related to JSONAPI spec |
@iamareebjamal As you said that the amount of information will be quite high as to load all attendees, I want to change my proposal. |
I don't think the user will ever be aware of attendee ID at all, it is a system internal ID and is not tied to one user. A user can have thousand attendee ID if thousand tickets are bought on his account |
@iamareebjamal I have tried all possibilities and it seems that it's either going to be tough to implement the huge data or unnecessary. Do you have any suggestions to implement any kind of attending functionality? or should I just close the issue ? |
I think if there is a possibility to just mark that you are attending, that is enough. If not, then please close the issue |
Actual Behaviour
The app doesnt collect information about the number of people attending the summit.
Expected Behaviour
The app should let the user post himself as attending the regarded conference.
The information can be posted as it is present in the api https://open-event-api.herokuapp.com/#attendees
Would you like to work on the issue?
Yes
@iamareebjamal Has this issue been already covered ?, if not can I start working on it?
The text was updated successfully, but these errors were encountered: