MTM Fox OwnYourSwarm checkins #82

Merged
jonny merged 1 commit from develop into main 2026-03-14 20:23:19 +01:00
2 changed files with 87 additions and 87 deletions

View file

@ -46,7 +46,7 @@ class EntryData extends MicropubData
name: Arr::get($data, 'properties.name.0'), name: Arr::get($data, 'properties.name.0'),
description: Arr::get($data, 'properties.description.0'), description: Arr::get($data, 'properties.description.0'),
geo: Arr::get($data, 'properties.geo.0'), geo: Arr::get($data, 'properties.geo.0'),
checkin: Arr::get($data, 'checkin'), checkin: Arr::get($data, 'properties.checkin.0'),
syndication: Arr::get($data, 'properties.syndication.0'), syndication: Arr::get($data, 'properties.syndication.0'),
photos: Arr::get($data, 'properties.photo'), photos: Arr::get($data, 'properties.photo'),
); );

View file

@ -37,8 +37,7 @@ class SwarmTest extends TestCase
'value' => 'My first #checkin using Example Product', 'value' => 'My first #checkin using Example Product',
'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>', 'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>',
]], ]],
], 'checkin' => [[
'checkin' => [
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Awesome Venue'], 'name' => ['Awesome Venue'],
@ -46,6 +45,7 @@ class SwarmTest extends TestCase
'latitude' => ['1.23'], 'latitude' => ['1.23'],
'longitude' => ['4.56'], 'longitude' => ['4.56'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
@ -64,7 +64,7 @@ class SwarmTest extends TestCase
} }
/** /**
* This request would actually come from another client than OwnYourSwarm, but were testing * This request would actually come from another client than OwnYourSwarm, but we're testing
* OpenStreetMap data. * OpenStreetMap data.
*/ */
#[Test] #[Test]
@ -83,8 +83,7 @@ class SwarmTest extends TestCase
'value' => 'My first #checkin using Example Product', 'value' => 'My first #checkin using Example Product',
'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>', 'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>',
]], ]],
], 'checkin' => [[
'checkin' => [
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Awesome Venue'], 'name' => ['Awesome Venue'],
@ -92,6 +91,7 @@ class SwarmTest extends TestCase
'latitude' => ['1.23'], 'latitude' => ['1.23'],
'longitude' => ['4.56'], 'longitude' => ['4.56'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
@ -125,8 +125,7 @@ class SwarmTest extends TestCase
'value' => 'My first #checkin using Example Product', 'value' => 'My first #checkin using Example Product',
'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>', 'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>',
]], ]],
], 'checkin' => [[
'checkin' => [
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Awesome Venue'], 'name' => ['Awesome Venue'],
@ -134,6 +133,7 @@ class SwarmTest extends TestCase
'latitude' => ['1.23'], 'latitude' => ['1.23'],
'longitude' => ['4.56'], 'longitude' => ['4.56'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
@ -159,8 +159,7 @@ class SwarmTest extends TestCase
'properties' => [ 'properties' => [
'published' => [Carbon::now()->toDateTimeString()], 'published' => [Carbon::now()->toDateTimeString()],
'syndication' => ['https://www.swarmapp.com/checkin/def'], 'syndication' => ['https://www.swarmapp.com/checkin/def'],
], 'checkin' => [[
'checkin' => [
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Awesomer Venue'], 'name' => ['Awesomer Venue'],
@ -168,6 +167,7 @@ class SwarmTest extends TestCase
'latitude' => ['3.21'], 'latitude' => ['3.21'],
'longitude' => ['6.54'], 'longitude' => ['6.54'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
@ -202,13 +202,13 @@ class SwarmTest extends TestCase
'value' => 'My first #checkin using Example Product', 'value' => 'My first #checkin using Example Product',
'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>', 'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>',
]], ]],
], 'checkin' => [[
'checkin' => [
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Awesome Venue'], 'name' => ['Awesome Venue'],
'url' => ['https://foursquare.com/v/123456'], 'url' => ['https://foursquare.com/v/123456'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
@ -240,21 +240,21 @@ class SwarmTest extends TestCase
'value' => 'My first #checkin using Example Product', 'value' => 'My first #checkin using Example Product',
'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>', 'html' => 'My first #checkin using <a href="http://example.org">Example Product</a>',
]], ]],
], 'location' => [[
'location' => [
'type' => ['h-adr'], 'type' => ['h-adr'],
'properties' => [ 'properties' => [
'latitude' => ['1.23'], 'latitude' => ['1.23'],
'longitude' => ['4.56'], 'longitude' => ['4.56'],
'street-address' => ['Awesome Street'], 'street-address' => ['Awesome Street'],
], ],
], ]],
'checkin' => [ 'checkin' => [[
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Awesome Venue'], 'name' => ['Awesome Venue'],
'url' => ['https://foursquare.com/v/123456'], 'url' => ['https://foursquare.com/v/123456'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
@ -279,11 +279,10 @@ class SwarmTest extends TestCase
'type' => ['h-entry'], 'type' => ['h-entry'],
'properties' => [ 'properties' => [
'published' => [Carbon::now()->toDateTimeString()], 'published' => [Carbon::now()->toDateTimeString()],
],
'syndication' => [ 'syndication' => [
'https://www.swarmapp.com/user/199841/checkin/5c4b1ac56dcf04002c0a4f58', 'https://www.swarmapp.com/user/199841/checkin/5c4b1ac56dcf04002c0a4f58',
], ],
'checkin' => [ 'checkin' => [[
'type' => ['h-card'], 'type' => ['h-card'],
'properties' => [ 'properties' => [
'name' => ['Forbidden Planet'], 'name' => ['Forbidden Planet'],
@ -296,8 +295,8 @@ class SwarmTest extends TestCase
'postal-code' => ['M1 1JR'], 'postal-code' => ['M1 1JR'],
], ],
'value' => 'https://foursquare.com/v/4ade0e46f964a520bf6f21e3', 'value' => 'https://foursquare.com/v/4ade0e46f964a520bf6f21e3',
], ]],
'location' => [ 'location' => [[
'type' => ['h-adr'], 'type' => ['h-adr'],
'properties' => [ 'properties' => [
'latitude' => [53.483153021713], 'latitude' => [53.483153021713],
@ -307,6 +306,7 @@ class SwarmTest extends TestCase
'country-name' => ['United Kingdom'], 'country-name' => ['United Kingdom'],
'postal-code' => ['M1 1JR'], 'postal-code' => ['M1 1JR'],
], ],
]],
], ],
], ],
['HTTP_Authorization' => 'Bearer ' . $this->getToken()] ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]