Commit graph

395 commits

Author SHA1 Message Date
Marius Orcsik
3316087ffe
Change Activity.Actor property to be ObjectOrLink interface 2018-08-31 13:40:02 +02:00
Marius Orcsik
26b16b6ece
NaturalLanguage Unmarshal test and improvements 2018-08-31 13:38:15 +02:00
Marius Orcsik
5213806994
Updated the Unmarshalling with a test for replies 2018-08-15 11:33:50 +02:00
Marius Orcsik
aca7b90c04
Revert "We didn't want collections, but Object arrays"
We really want collections according to the ActivityStreams spec

This reverts commit ea3b4d64fc.
2018-08-15 11:05:36 +02:00
Marius Orcsik
ea3b4d64fc
We didn't want collections, but Object arrays 2018-08-14 22:37:05 +02:00
Marius Orcsik
5e87858568
Modified Replies property to implement CollectionInterface
Added Replies to unmarshalling
2018-08-14 22:31:06 +02:00
Marius Orcsik
28d2a1e33f
Added published date and other date fields to Object/Collection unmarshall 2018-08-06 19:11:24 +02:00
Marius Orcsik
df4429ff16
Fix the marshalling of @context
Add some description to the logic we're using
2018-08-06 16:51:44 +02:00
Marius Orcsik
b6ec84c634
Renamed func type 2018-08-06 15:26:50 +02:00
Marius Orcsik
1419759f28
Improving @context to support marshalling to string/map/array of maps 2018-08-06 15:26:20 +02:00
Marius Orcsik
e8c286814e
Return IRIs if incoming json value for a property is url like 2018-08-06 13:10:34 +02:00
Marius Orcsik
c76d5dd269
Use constant for empty Term value 2018-08-06 13:09:38 +02:00
Marius Orcsik
b4ab90daff
Use constant for empty LangRef value 2018-08-06 13:09:24 +02:00
Marius Orcsik
d4b287f531
Fix collection unmarshalling test
Add generator and attributedTo properties to the test
2018-08-06 13:06:14 +02:00
Marius Orcsik
c5483e5997
Adding mediatype to object unmarshalling 2018-08-05 16:33:51 +02:00
Marius Orcsik
ab11b36979
Improvement towards ensuring we implement a type of unmarshaller before trying it 2018-08-05 16:27:39 +02:00
Marius Orcsik
295a299ccc
Revert from using unmarshalToAPObject in loading collection items 2018-08-05 16:20:26 +02:00
Marius Orcsik
716081ff13
Added generator to object unmarshal 2018-08-05 15:25:54 +02:00
Marius Orcsik
fb363aa377
Improve collection unmarshalling 2018-08-05 13:54:01 +02:00
Marius Orcsik
e5bc4e644c
Improve getAPObjectByType to return ObjectOrLink 2018-08-05 13:53:29 +02:00
Marius Orcsik
a3a8044267
Make all activities implement ObjectOrLink 2018-08-05 13:52:40 +02:00
Marius Orcsik
7643c4abdc
Make the hack for marshaling with context even uglier
Test if marshalled object is a payloadWithContext and only replace in
output if it is.
2018-08-04 13:20:24 +02:00
Marius Orcsik
f40d875d04
Going deeper and deeper down the jsonld rabbit hole.
The current approach doesn't look too good
2018-08-01 10:52:11 +02:00
Marius Orcsik
5a2c4b51dd
Making some tag related functionality exportable
Replacing global package var Context with WithContext().Marshal()
2018-07-31 23:24:33 +02:00
Marius Orcsik
43573f7d36
Exporting tag related functionality 2018-07-26 10:44:28 +02:00
Marius Orcsik
55205ca1d7
Fix coverage generation 2018-07-25 13:07:50 +02:00
Marius Orcsik
0eedce953c
Fix error regarding output specifier 2018-07-25 12:52:07 +02:00
Marius Orcsik
9317dd12c7
Force install of jsonparser before activitypub tests 2018-07-25 12:35:41 +02:00
Marius Orcsik
b4baafa9f3
Fix Outbox test 2018-07-25 12:34:36 +02:00
Marius Orcsik
c81b23876a
Use CollectionInterface as types for Actor collections 2018-07-25 12:13:55 +02:00
Marius Orcsik
51f73c2cba
Fix failing test regarding ObjectID 2018-07-25 11:57:49 +02:00
Marius Orcsik
a5dd932a24
Add go modules support 2018-07-25 11:56:05 +02:00
Marius Orcsik
8038688be4
Making []Item and URI/IRI structs conform to ObjectOrLink 2018-07-25 11:54:12 +02:00
Marius Orcsik
6285a8fc39
Add convenience method for returning the first element in NaturalLanguageValue map 2018-07-25 11:47:41 +02:00
Marius Orcsik
7a2ce46e04
Refactored GetID to allow it to return nil 2018-07-25 11:47:03 +02:00
Marius Orcsik
4dc584b0d4
Added UnmarshalJSON methods for some types
Add some tests
2018-07-24 23:11:08 +02:00
Marius Orcsik
57dab0cb45
More implementations for IsLink and GetType 2018-07-20 18:28:26 +02:00
Marius Orcsik
fb7c74da76
Making Collections obey ObjectOrLink interface too 2018-07-20 18:18:13 +02:00
Marius Orcsik
2183a1accc
Adding IsObject and GetID to Like and Dislike 2018-07-20 18:16:51 +02:00
Marius Orcsik
1100bd7ddc
Adding IsObject to collections 2018-07-18 21:34:08 +02:00
Marius Orcsik
e630cf771c
Move implementations for IsLink 2018-07-18 21:23:23 +02:00
Marius Orcsik
fa5b0e2012
Corrected some wrong doc comments 2018-07-18 18:18:19 +02:00
Marius Orcsik
9469b0ea40
Link.Rel can be ommited if empty 2018-07-18 17:33:58 +02:00
Marius Orcsik
a28dffdde4
Removed reference to activitypub package in test 2018-07-18 17:21:24 +02:00
Marius Orcsik
72c2d5c331
Use package aliases for jsonld and activitypub in tests 2018-07-18 16:33:40 +02:00
Marius Orcsik
23b0a13e95
Add local LangRef string type alias 2018-07-18 16:31:00 +02:00
Marius Orcsik
6b75ad6d68
Fix quotes being kept for string type aliases in UnmarshalJSON methods 2018-07-18 16:29:47 +02:00
Marius Orcsik
12f481a243
Adding mediaType to Object 2018-07-18 16:27:53 +02:00
Marius Orcsik
44bcbcfb3a
Adding/cleaning up some more function comments 2018-07-16 16:38:15 +02:00
Marius Orcsik
9a140c8036
Add tests for methods of various Collection objects 2018-07-16 15:48:37 +02:00