9.3.1 • Published 10 years ago

ark-trip v9.3.1

Weekly downloads
146
License
-
Repository
github
Last release
10 years ago

Trip

How to use - plugin

Setup

  • POST to /trips/setup

pagination

  • maximal number of return object is currently 10 (default) TODO: needs to be discussed
  • implemented for GET route:
    • /trips
    • /trips/search

how to use - pagination

  • add query parameters for 'page' and 'page_size' e.g.: ?page=2&page_size=10 => result: 11 - 20

Search

parameters

Parameteroptional / requiredinfo
cityrequired/trips/search/city
moodoptional/trips/search/.mood1.mood2.mood3
city/moodrequired/trips/search/cityid.mood1.mood2
checkin/checkoutoptional/trips/search/cityid.mood1/?start_date=2014-04-20T00:00:00.000Z&end_date=2016-04-20T00:00:00.000Z
daysoptional/trips/search/cityid.mood1/?days=2
personsoptional/trips/search/cityid.mood1/?persons=3
paginationoptional/trips/search/cityid.mood1/?page=1&page_size=10 (default)

start_date=2014-04-20T00:00:00.000Z&end_date=2016-04-20T00:00:00.000Z

result relevance

parameterrelevance
moods0.5/(number of moods)
days0.3
persons0.2
SUM:1.0

example call

/trips/search/58433437e7710a957cd798b0774a79385389035b.buddytrip.mood2.mood3?budget=100start_date=2014-04-20T00:00:00.000Z&end_date=2016-04-20T00:00:00.000Z&persons=3

!!! Wichtig: Wenn nicht alle parameter übermittelt werden, soll die Summe aller Parameter trotzdem 1 sein! (Übereinstimmungen / Summe der übermittelten Parameter)

Routes

####GET

RessourceDescriptionon Successon Failure
/tripsreturn only first 100 tripsjson objectstatusCode: 404
/trips/:tripIDreturn a particular trip by idjson objectstatusCode: 404
/trips/search/*(see below)search for a tripjson object with all matchesstatusCode: 404

*/trips/search/58433437e7710a957cd798b0774a79385389035b.buddytrip.mood2.mood3?budget=100start_date=2014-04-20T00:00:00.000Z&end_date=2016-04-20T00:00:00.000Z&persons=3 !!before '?' no '/' (at the moment..)"

####POST |Ressource | Description | on Success | on Failure | |---|---|---|---| |/trips | create new trip | statusCode: 200 | statusCode: 404 | |/trips/setup | setup all routes and lists for trip plugin | statusCode: 200 | statusCode: 404 |

####PUT |Ressource | Description | on Success | on Failure | |---|---|---|---| |/trips/:tripID | update particular trip by id | statusCode: 200 | statusCode: 404 |

####DELETE |Ressource | Description | on Success | on Failure | |---|---|---|---| |/trips/:tripID | delete particular trip by id | statusCode: 200 | statusCode: 404 |

Dummy Json Results

Specific Trip - GET /trips/:tripID
{
  "_id": "1849ef313fbc39f078084f9168000e16",
  "_rev": "4-c726329a4e810962443ce5a7a176b00c",
  "title": "my trip",
  "userid": "adsf5as87f57a65f7a6578asdf57865",
  "description": "bla bla bla",
  "description_money": "Du solltest so X Geld mitbringen ..., für ..."
  "city": {
    "id": "58433437e7710a957cd798b0774a79385389035b",
    "title": "Konstanz",
    "place_id": "ChIJWx8MOBv2mkcR0JnfpbdrHwQ"
  },
  "start_date": "2015-04-20T00:00:00.000Z",
  "end_date": "2015-04-23T00:00:00.000Z",
  "duration": "2",
  "persons": "3",
  "accommodation": "true",
  "accommodation_equipment" : ["shower", "breakfast", "tv"],
  "locations": [],
  "main_image": {
       "picture": "/i/trips/0de6ad3bdee73edf83e6848c162280f8/cooler-trip.png",
       "thumbnail": "/i/trips/0de6ad3bdee73edf83e6848c162280f8/cooler-trip-thumb.png"
   },
  "images": [{...}, {...}, ...]
  "moods": ["halligallidrecksaufest", "grilsontour"],
  "activ": "true",
  "delete": "false",
  "type": "trip"
}
Multiple Trips, filtered by arguments - GET /trips/search/{city.moods}/?...

(whats the difference? We should provide a thumbnail in the trip overview, not an array of big size pics)

[
    {
        ...
        "thumbnail":[...],
        ...
    },
    {
       ...
    },
    {
      ...
    },
    {
      ...
    }
]
9.3.1

10 years ago

9.3.0

10 years ago

9.2.2

10 years ago

9.2.1

10 years ago

9.2.0

10 years ago

9.1.0

10 years ago

9.0.6

10 years ago

9.0.5

10 years ago

9.0.4

10 years ago

9.0.3

10 years ago

9.0.2

10 years ago

9.0.1

10 years ago

9.0.0

10 years ago

8.0.0

10 years ago

7.1.1

10 years ago

7.1.0

10 years ago

7.0.2

10 years ago

7.0.1

10 years ago

7.0.0

10 years ago

6.3.2

10 years ago

6.3.1

10 years ago

6.3.0

10 years ago

6.2.0

10 years ago

6.1.0

10 years ago

6.0.2

10 years ago

6.0.1

10 years ago

6.0.0

10 years ago

5.0.0

10 years ago

4.0.5

10 years ago

4.0.4

10 years ago

4.0.3

10 years ago

4.0.2

10 years ago

4.0.0

10 years ago

3.4.0

10 years ago

3.3.0

10 years ago

3.1.1

10 years ago

3.1.0

10 years ago

2.1.4

10 years ago

2.1.3

10 years ago

2.1.2

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago