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) (17) {
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 ["street3"]=>
29 string(0) ""
30 ["street4"]=>
31 string(0) ""
32 ["zip"]=>
33 string(6) "AA3000"
34 ["isarchived"]=>
35 bool(false)
36 ["createdts"]=>
37 object(\DateTime) (3) {
38 ["date"]=>
39 string(26) "2014-09-26 15:24:36.000000"
40 ["timezone_type"]=>
41 int(3)
42 ["timezone"]=>
43 string(3) "UTC"
44 }
45 ["lastupdatets"]=>
46 object(\DateTime) (3) {
47 ["date"]=>
48 string(26) "2014-09-26 15:24:36.000000"
49 ["timezone_type"]=>
50 int(3)
51 ["timezone"]=>
52 string(3) "UTC"
53 }
54 }
55 }
56}
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 Street3: "",
16 Street4: "",
17 Zip: "AA3000",
18 Isarchived: false,
19 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
20 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
21 },
22 },
23}
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 "street3": "",
19 "street4": "",
20 "zip": "AA3000",
21 "isarchived": false,
22 "createdts": "2014-09-26 15:24:36",
23 "lastupdatets": "2014-09-26 15:24:36"
24 }
25 ]
26}
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" |
street3 string | |
street4 string | |
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[]