Get a list of event locations
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/events/eventlocations
Example
Request
1use Ticketmatic\Endpoints\Settings\Events\Eventlocations;
2
3$result = Eventlocations::getlist($client, array(
4 "filter" => "SELECT id FROM tm.eventlocation WHERE city='Leuven'",
5 "includearchived" => true,
6 "lastupdatesince" => "2014-09-26 15:24:36",
7));
8
9// The parameters array is optional, it can be omitted when empty.
10$result = Eventlocations::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Events\EventlocationsList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\EventLocation) (15) {
6 ["id"]=>
7 int(0)
8 ["name"]=>
9 string(17) "Main concert hall"
10 ["city"]=>
11 string(6) "Leuven"
12 ["countrycode"]=>
13 string(2) "US"
14 ["geostatus"]=>
15 int(0)
16 ["info"]=>
17 string(41) "This location is easily reached by train."
18 ["lat"]=>
19 float(50.868141)
20 ["long"]=>
21 float(4.712266)
22 ["state"]=>
23 string(5) "Texas"
24 ["street1"]=>
25 string(11) "Main street"
26 ["street2"]=>
27 string(7) "1 box 4"
28 ["zip"]=>
29 string(6) "AA3000"
30 ["isarchived"]=>
31 bool(false)
32 ["createdts"]=>
33 object(\DateTime) (3) {
34 ["date"]=>
35 string(26) "2014-09-26 15:24:36.000000"
36 ["timezone_type"]=>
37 int(3)
38 ["timezone"]=>
39 string(3) "UTC"
40 }
41 ["lastupdatets"]=>
42 object(\DateTime) (3) {
43 ["date"]=>
44 string(26) "2014-09-26 15:24:36.000000"
45 ["timezone_type"]=>
46 int(3)
47 ["timezone"]=>
48 string(3) "UTC"
49 }
50 }
51 }
52}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/events/eventlocations"
4)
5
6result, err := eventlocations.Getlist(client, &ticketmatic.EventLocationQuery{
7 Filter: "SELECT id FROM tm.eventlocation WHERE city='Leuven'",
8 Includearchived: true,
9 Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10})
11
12// The query object is optional, it can be omitted when empty.
13result, err := eventlocations.Getlist(client, nil)
Response
1result := eventlocations.&List{
2 Data: []*ticketmatic.EventLocation{
3 &ticketmatic.EventLocation{
4 Id: 123,
5 Name: "Main concert hall",
6 City: "Leuven",
7 Countrycode: "US",
8 Geostatus: 0,
9 Info: "This location is easily reached by train.",
10 Lat: 50.86814117,
11 Long: 4.71226645,
12 State: "Texas",
13 Street1: "Main street",
14 Street2: "1 box 4",
15 Zip: "AA3000",
16 Isarchived: false,
17 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
18 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
19 },
20 },
21}
Request
1GET /api/1/{accountname}/settings/events/eventlocations HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "name": "Main concert hall",
9 "city": "Leuven",
10 "countrycode": "US",
11 "geostatus": 0,
12 "info": "This location is easily reached by train.",
13 "lat": 50.868141,
14 "long": 4.712266,
15 "state": "Texas",
16 "street1": "Main street",
17 "street2": "1 box 4",
18 "zip": "AA3000",
19 "isarchived": false,
20 "createdts": "2014-09-26 15:24:36",
21 "lastupdatets": "2014-09-26 15:24:36"
22 }
23 ]
24}
Parameters
Field | Description |
---|---|
filter
|
Type reference: EventLocationQuery
Result fields
This call returns an object with an array of objects in the data
field.
Field | Description |
---|---|
id int | Unique ID Example value:123 |
name | Name of the location Example value:"Main concert hall" |
city string | City Example value:"Leuven" |
countrycode string | Country code. Should be an ISO 3166-1 alpha-2 two-letter code. Example value:"US" |
geostatus int | Geocode status for the address of this location. |
info | Practical info on the event location (route description, public transport, parking,…). Example value:"This location is easily reached by train." |
lat decimal | Lat coordinate for the event location Example value:50.868141 |
long decimal | Long coordinate for the event location Example value:4.712266 |
state string | State Example value:"Texas" |
street1 string | Street name Example value:"Main street" |
street2 string | Nr. + Box Example value:"1 box 4" |
zip string | Zipcode Example value:"AA3000" |
isarchived bool | Whether or not this item is archived |
createdts timestamp | Created timestamp Example value:"2014-09-26 15:24:36" |
lastupdatets timestamp | Last updated timestamp Example value:"2014-09-26 15:24:36" |
This type can have custom fields.
Type reference: EventLocation[]