summaryrefslogtreecommitdiff
path: root/desk/sur/twatter/json.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'desk/sur/twatter/json.hoon')
-rw-r--r--desk/sur/twatter/json.hoon105
1 files changed, 105 insertions, 0 deletions
diff --git a/desk/sur/twatter/json.hoon b/desk/sur/twatter/json.hoon
new file mode 100644
index 0000000..476508b
--- /dev/null
+++ b/desk/sur/twatter/json.hoon
@@ -0,0 +1,105 @@
+=, dejs-soft:format
+|%
+++ username
+%- ot :_ ~ :- 'data'
+%- ot :_ ~ :- 'user'
+%- ot :_ ~ :- 'result'
+%- ot
+ :~ :: :- '__typename' so
+ :: :- 'id' so
+ :- 'rest_id' so
+ :: :- 'profile_image_shape' so
+ :: :- 'is_profile-translatable' bo
+ :: :- 'is_blue_verified' bo
+ :: :- 'has_graduated_access' bo
+ :: :- 'is_profile-translatable' bo
+ :: :- 'creator_subscriptions_count' ni
+ :: :- 'legacy_extended_profile' so :: empty objects
+ :: :- 'verification_info' so
+ :: :- 'business_account' so
+ :: :- 'affiliates_highlighted_label' so
+ :: :- 'legacy' %- ot
+ :: :~ :- 'can-dm' bo
+ :: :- 'can-media-tag' bo
+ :: :- 'can-media-tag' bo
+ :: :- 'default_profile' bo
+ :: :- 'default_profile_image' bo
+ :: :- 'has_custom_timelines' bo
+ :: :- 'is_translator' bo
+ :: :- 'possibly_sensitive' bo
+ :: :- 'verified' bo
+ :: :- 'want_retweets' bo
+ :: :- 'fast_followers_count' ni
+ :: :- 'favourites_count' ni
+ :: :- 'followers_count' ni
+ :: :- 'friends_count' ni
+ :: :- 'listed_count' ni
+ :: :- 'media_count' ni
+ :: :- 'normal_followers_count' ni
+ :: :- 'statuses_count' ni
+ :: :- 'description' so
+ :: :- 'location' so
+ :: :- 'name' so
+ :: :- 'profile_banner_url' so
+ :: :- 'profile_image_url_https' so
+ :: :- 'screen_name' so
+ :: :- 'profile_interstitial_type' so :: mmm
+ :: :- 'translator_type' so
+ :: :- 'pinned_tweets_ids_str' (ar so)
+ :: :- 'withheld_in_countries' (ar so)
+ :: :- 'entities' %- ot
+ :: :~ :- 'description' %- ot
+ :: :~ :- 'urls' (ar so)
+ :: ==
+ :: ==
+ :: ==
+ ==
+++ user-tweets
+=, dejs-soft:format
+%- ot :_ ~ :- 'data'
+%- ot :_ ~ :- 'user'
+%- ot :_ ~ :- 'result'
+%- ot
+ :~ :- '__typename' so
+ :- 'timeline_v2' %- ot :_ ~
+ :- 'timeline' %- ot
+ :~ :- 'metadata' %- ot ~
+ :- 'instructions' (ar instruction)
+ ==
+ ==
+++ instruction
+|= jon=json
+ :: ?>(%o -.jon)
+ =/ type (~(got by p.jon) 'type')
+ ?: .=([%s 'TimelineClearCache'] type) ((ot ~) jon)
+ ?: .=([%s 'TimelinePinEntry'] type) ((ot timeline-pin-entry) jon)
+ ?: .=([%s 'TimelineAddEntries'] type) ((ot timeline-add-entries) jon)
+ !!
+
+:~ :- 'TimelinePinEntry' timeline-pin-entry
+ :- 'TimelineAddEntries' timeline-add-entries
+==
+
+++ timeline-pin-entry
+%- ot
+:~ :- 'type' so
+ :- 'entry' %- ot
+ :~ :- 'entryId' so
+ :- 'sortIndex' so
+ :- 'content' content
+ ==
+==
+++ timeline-add-entries
+so
+++ content
+%- ot
+:~ :- 'entryType' so
+ :- '__typename' so
+ :- 'itemContent' item-content
+ :- 'clientEventInfo' client-event-info
+==
+++ item-content
+so
+++ client-event-info
+so
+--