Skip to content

Instantly share code, notes, and snippets.

@marrus-sh
Created April 18, 2018 23:55
Show Gist options
  • Save marrus-sh/7ec8b80806f7409c4216dede8cb1432e to your computer and use it in GitHub Desktop.
Save marrus-sh/7ec8b80806f7409c4216dede8cb1432e to your computer and use it in GitHub Desktop.
ActivityMon → Masto

ActivityMon in Mastodon

This is what is required for a minimal sort of starting implementation.

Models

Mon and Species are the only required objects but I've gone and listed the rest for completeness.

Mon
These are only the "required" properties for Mon; we can add more later. Recall that Mon are Actors. The owner of a Mon is immutable after creation (even if null).
id [whatever Masto uses for ids]
owner Account (may be null)
species Species
ability URI
affinity [a list of URIs (possibily limit length to 2)]
ivs [a Stats list]
forme [a list of URIs, possibly empty]
nature URI
name String (should match display name production)
Species
id [whatever Masto uses for ids]
icon (eventually should support directional images but we can start with just a generic icon)
image (eventually should support directional images but we can start with just a generic image)
ability URI
affinity [a list of URIs (possibily limit length to 2)]
forme [a list of URIs, possibly empty]
nature URI
name String (should match display name production)
Item
id [whatever Masto uses for ids]
kind URI
Route
Routes might be upgraded to actors at some point, I haven't decided.
id [whatever Masto uses for ids]
name String
MoveKind
id [whatever Masto uses for ids]
affinity URI
usesStat URI
name String

Controllers

ActivityPub.

  • There need to be controllers to handle at least the Use and Capture requests. These can always Reject until we figure out some rules for those.

API.

  • There should be an API point for sending a Capture to a mon (probably in the accounts namespace)
  • There should be an API point for—at least—editing the name of an owned mon

Admin.

  • There needs to be a way of creating, modifying, and deleting Species and Routes.

Views

ActivityPub.

  • Accounts should have a mon collection.

  • A Region object should link to dex and routes collections.

  • Correct AP objects should be serializable for all of the above.

API.

  • Mon should be represented as Accounts with an additional mon_data property (which will be absent on normal Accounts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment