konfetti-app/konfetti-backend

Endpoint to request all Konfetti Ideas

Closed this issue · 3 comments

We need a way to get all Konfetti ideas from the server that belong to one neighborhood.

This needs to contain all public ideas that are up for voting and all ideas that belong to the user and tnat may be still in review or got rejected.

Optional: Also "old" ideas was past events should be part of this - like for archive, when they are within a limit of a certain time (e.g. last month).

The sample/mock ideas data objects I work with on the client side look like this:

{
            "title":"Vogelhaus bauen",
            "description":"Am Spielplatz am Beispielplatz wollen wir ein oder mehrere Vogelhäuser bauen. Wer ist dabei?",
            "address":"Beipsielplatz 3",
            "gps":null,
            "date":1521559800000,
            "wantsHelper":true,
            "helpDescription":"Jeder der einen Hammer Schwingen will. Wer eine kleine Motorstichsäge hat - das wäre super.",
            "wantsGuest":false,
            "reviewStatus":"OK",
            "konfettiTotal": 11,
            "konfettiUser": 0,
            "userIsHelping": false,
            "userIsAttending": false,
            "created": { 
              "byUser" : {
                "nickname" : "Christian",
                "avatar" : {
                  "filename" : "avatar-416c2727ae4fce156081d24b31fb3ada.jpg"
                }
              },
              "ts" : 1516981457
            }
          }

... or like this ...


{
              "title":"Kinderfussball",
              "description":"Kinder. Fussball. 90 Minuten.",
              "address":"Beipsielplatz 3",
              "gps": { "lat": 52.519839, "lon": 13.408893 },
              "date":1521561800000,
              "wantsHelper":false,
              "helpDescription":"",
              "wantsGuest":true,
              "reviewStatus":"OK",
              "konfettiTotal": 8,
              "konfettiUser": 0,
              "userIsHelping": false,
              "userIsAttending": false,
              "created": { 
                "byUser" : {
                  "nickname" : "Christian",
                  "avatar" : {
                    "filename" : "avatar-416c2727ae4fce156081d24b31fb3ada.jpg"
                  }
                },
                "ts" : 1517081457
              }
            }

Some comments on the data fields:

"konfettiTotal" --> The amount of total konfetti on this idea
"konfettiUser" --> The amount of konfetti that the user already put on that idea ... if not possible the UI at least needs to know if the user alread voted once on this idea.

"reviewStatus" --> possible values:
'WAIT' : waiting for review
'OK' : review OK
'REJECTED' : review failed

"userIsHelping" --> has user commited to be part of the helping team
"userIsAttending" --> has user confirmed to visit the event

"created" --> same way as on a chat

Nachtrag. Was da noch fehlt, dass ja zu jeder Idee ein Orgachat gehört ... auf diesen müsste da auch noch eine Referenz rein --> orgaChatID:string

please check if fields userIsHelping and userIsAttending are present. I think my test-tools failed me on this one (i can see the fields in the debugger, but not in the response ?!).

orga-chat reference is still open here.