diff --git a/bruno/OpenData datatourisme/environments/prod.bru b/bruno/OpenData datatourisme/environments/prod.bru index 2a3fb5d..424b026 100644 --- a/bruno/OpenData datatourisme/environments/prod.bru +++ b/bruno/OpenData datatourisme/environments/prod.bru @@ -1,4 +1,5 @@ vars { EXPRESS_API: https://drink-tweb.cb85.fr OTM_KEY: 5ae2e3f221c38a28845f05b6494c021573d9608a4d749ce8af625e0f + PB_URL: https://pb-tweb.cb85.fr } diff --git a/bruno/OpenData datatourisme/poketBase_api/connexion.bru b/bruno/OpenData datatourisme/poketBase_api/connexion.bru new file mode 100644 index 0000000..dde343c --- /dev/null +++ b/bruno/OpenData datatourisme/poketBase_api/connexion.bru @@ -0,0 +1,18 @@ +meta { + name: connexion + type: http + seq: 1 +} + +post { + url: {{PB_URL}}/api/collections/users/auth-with-password + body: json + auth: none +} + +body:json { + { + "identity": "michel.biche@aptatio.com", + "password": "123456789" + } +} diff --git a/bruno/OpenData datatourisme/poketBase_api/link user to poi.bru b/bruno/OpenData datatourisme/poketBase_api/link user to poi.bru new file mode 100644 index 0000000..bb6a5bd --- /dev/null +++ b/bruno/OpenData datatourisme/poketBase_api/link user to poi.bru @@ -0,0 +1,22 @@ +meta { + name: link user to poi + type: http + seq: 3 +} + +post { + url: {{PB_URL}}/api/collections/user_poi/records + body: json + auth: bearer +} + +auth:bearer { + token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJfcGJfdXNlcnNfYXV0aF8iLCJleHAiOjE3MTg4Mjg0NzEsImlkIjoidnZ5OTNtMWhvYWVzaHd5IiwidHlwZSI6ImF1dGhSZWNvcmQifQ.pC7u-QaZ_BYqWA5wG8wu1lRbbd4mKuKeAveWe_IBnfU +} + +body:json { + { + "owner": "vvy93m1hoaeshwy", + "poi_list": "sh430u0im37cxm5" + } +} diff --git a/bruno/OpenData datatourisme/poketBase_api/send a poi.bru b/bruno/OpenData datatourisme/poketBase_api/send a poi.bru new file mode 100644 index 0000000..c75c300 --- /dev/null +++ b/bruno/OpenData datatourisme/poketBase_api/send a poi.bru @@ -0,0 +1,40 @@ +meta { + name: send a poi + type: http + seq: 2 +} + +post { + url: {{PB_URL}}/api/collections/POI/records + body: json + auth: bearer +} + +auth:bearer { + token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJfcGJfdXNlcnNfYXV0aF8iLCJleHAiOjE3MTg4Mjg0NzEsImlkIjoidnZ5OTNtMWhvYWVzaHd5IiwidHlwZSI6ImF1dGhSZWNvcmQifQ.pC7u-QaZ_BYqWA5wG8wu1lRbbd4mKuKeAveWe_IBnfU +} + +body:json { + { + "Poi_id": "11472887", + "Poi": { + "type": "Feature", + "id": "11472887", + "geometry": { + "type": "Point", + "coordinates": [ + -0.0626024, + 51.4924088 + ] + }, + "properties": { + "xid": "W544344833", + "name": "The Blue Anchor", + "rate": 2, + "osm": "way/544344833", + "wikidata": "Q7718716", + "kinds": "pubs,foods,shops,marketplaces,tourist_facilities" + } + } + } +}