diff --git a/docs/parse/action_schema.md b/docs/parse/action_schema.md new file mode 100644 index 0000000..b7a7bbd --- /dev/null +++ b/docs/parse/action_schema.md @@ -0,0 +1,127 @@ +# Action Object + +The action object represents something that the campaign would like a supporter to do. Things like calling somebody, sending an email, tweet / retweet, post to facebook, etc. + +``` +let actionObject = PFObject(className: "Action") +``` + +### List View + +The action objects should be queried and ordered by priority descending, then by createdAt descending. + +``` +query.addDescendingOrder("priority") +query.addDescendingOrder("createdAt") +``` + +### Action Types ### + +| Action Type | Description | +| ----------- | ----------- | +| general | A general call to action with no specific integrations. | +| url | A general call to action that will open the browser to the specified url. This can be used for directing people to fill out a petition, comment on a blog post / forum, etc. | +| call | Place a phone call to the specified person. | +| email | Send an email to the specified person / people. | +| tweet | Send a tweet to your followers, the provided text should pre-populate the tweet if possible. | +| retweet | Retweet a specified tweet. | +| tweet_reply | Reply to a tweet, the provided text should pre-populate the tweet if possible. The reply should also reference the included tweet id. | +| fb_post | Post to Facebook, the provided text should pre-populate the post if possible. | +| fb_share | Share a provided url to Facebook, the provided text should pre-populate the share if possible. | +| attend | Physical or virtual presence is needed at some event, etc. The request should generate a calendar event, and could advise people of a common hashtag to use while attending the event. | +| avatar | Set social media avatar. | +| instagram | Post to Instagram. | + +### Object Attributes / Columns + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| objectId | string | (auto) | Automatically generated primary key. | +| actionType | ActionType | Y | The type of action that is being called for. This drives the other fields which should be required or not based on the type. | +| title | string | N | The title of the requested action | +| message | string | Y | The text describing the action that needs to be taken. | +| thumbnailUrl | url | N | The thumbnail image that is shown in the list view for the actions. If not specified, this should default to an in-app default image. | +| imageUrl | url | N | The image that is shown in the action detail view. If this is not specified, it should not show an image on the detail screen.| +| createdAt | datetime | (auto) | The time the record was created. | +| updatedAt | datetime | (auto) | The time the recond was last updated. | +| priority | number | Y | Should default to 0. Field is used to control the order of the action list. The higher the priority, the higher on the list the item is.| + + +### Actions with additional fields + +Most actions have additional fields that are needed to fulfil the integrations, etc. + +#### Visit a Webpage: `url` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| ref | url | Y | The url to open up in the user's web-browser. (Not in-app webview) | + +#### Make a Phone Call: `call` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| ref | string | Y | The phone number (only digits, no dashes, periods, etc) this should prompt the user to dial, but not call the number without the user clicking the actual call button. (i.e. Android Dial intent) | + +#### Send an Email: `email` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| subject | string | Y | The text that should pre-populate the subject line of the email. | +| body | string | Y | The text that should pre-populate the email body. | +| recipients | Array | Y | An array of email addresses that should pre-populate in the To: field of the email. | + +#### Send a Tweet: `tweet` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| body | string | Y | The text that should pre-populate as the tweet. | + +#### Retweet a Message: `retweet` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| ref | string | Y | The id of the tweet that needs to be retweeted. | + +#### Reply to a Tweet: `tweet_reply` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| body | string | Y | The text that should pre-populate the text of the reply. | +| ref | string | Y | The id of the tweet that should be replied to. | + +#### Post to Facebook: `fb_post` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| body | string | Y | The text that should pre-populate the Facebook post. | + +#### Share a Link on Facebook: `fb_share` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| ref | string | Y | The url that needs to be shared via Facebook. | +| body | string | Y | The text that should pre-populate the Facebook share post. | + +#### Create Calendar Object: `attend` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| subject | string | Y | The text that should pre-populate the calendar object title. | +| body | string | Y | The text that should pre-populate the calendar object body. | +| startTime | string | Y | The start time formatted as a ISO-8601 date string (`yyyy-MM-dd'T'HH:mm:ssZ`) that should pre-populate the calendar object . | +| endTime | string | Y | The end time formatted as a ISO-8601 date string (`yyyy-MM-dd'T'HH:mm:ssZ`) that should pre-populate the calendar object . | +| location | string| N | The text that should pre-populate the calendar object location. | + +#### Update your Social Media Avatars: `avatar` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| ref | string | Y | The url or base64 encoded image to use in-place of the user's avatar on social networks. | + +#### Post to Instagram: `instagram` + +| Attribute | Data Type | Required | Description | +| --------- | --------- | -------- | ----------- | +| ref | string | Y | The url or base64 encoded image to post to Instagram. | + diff --git a/platform/native/ios/ios/ios.xcodeproj/project.pbxproj b/platform/native/ios/ios.xcodeproj/project.pbxproj similarity index 100% rename from platform/native/ios/ios/ios.xcodeproj/project.pbxproj rename to platform/native/ios/ios.xcodeproj/project.pbxproj diff --git a/platform/native/ios/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/platform/native/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from platform/native/ios/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to platform/native/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/platform/native/ios/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/Allen.xcuserdatad/UserInterfaceState.xcuserstate b/platform/native/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/Allen.xcuserdatad/UserInterfaceState.xcuserstate similarity index 100% rename from platform/native/ios/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/Allen.xcuserdatad/UserInterfaceState.xcuserstate rename to platform/native/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/Allen.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/platform/native/ios/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/ios.xcscheme b/platform/native/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/ios.xcscheme similarity index 100% rename from platform/native/ios/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/ios.xcscheme rename to platform/native/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/ios.xcscheme diff --git a/platform/native/ios/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/xcschememanagement.plist b/platform/native/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/xcschememanagement.plist similarity index 100% rename from platform/native/ios/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/xcschememanagement.plist rename to platform/native/ios/ios.xcodeproj/xcuserdata/Allen.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/platform/native/ios/ios/ios/AppDelegate.swift b/platform/native/ios/ios/AppDelegate.swift similarity index 100% rename from platform/native/ios/ios/ios/AppDelegate.swift rename to platform/native/ios/ios/AppDelegate.swift diff --git a/platform/native/ios/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/platform/native/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from platform/native/ios/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json rename to platform/native/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/platform/native/ios/ios/ios/Base.lproj/LaunchScreen.storyboard b/platform/native/ios/ios/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from platform/native/ios/ios/ios/Base.lproj/LaunchScreen.storyboard rename to platform/native/ios/ios/Base.lproj/LaunchScreen.storyboard diff --git a/platform/native/ios/ios/ios/Base.lproj/Main.storyboard b/platform/native/ios/ios/Base.lproj/Main.storyboard similarity index 100% rename from platform/native/ios/ios/ios/Base.lproj/Main.storyboard rename to platform/native/ios/ios/Base.lproj/Main.storyboard diff --git a/platform/native/ios/ios/ios/Info.plist b/platform/native/ios/ios/Info.plist similarity index 100% rename from platform/native/ios/ios/ios/Info.plist rename to platform/native/ios/ios/Info.plist diff --git a/platform/native/ios/ios/ios/ViewController.swift b/platform/native/ios/ios/ViewController.swift similarity index 100% rename from platform/native/ios/ios/ios/ViewController.swift rename to platform/native/ios/ios/ViewController.swift diff --git a/platform/native/ios/ios/iosTests/Info.plist b/platform/native/ios/iosTests/Info.plist similarity index 100% rename from platform/native/ios/ios/iosTests/Info.plist rename to platform/native/ios/iosTests/Info.plist diff --git a/platform/native/ios/ios/iosTests/iosTests.swift b/platform/native/ios/iosTests/iosTests.swift similarity index 100% rename from platform/native/ios/ios/iosTests/iosTests.swift rename to platform/native/ios/iosTests/iosTests.swift diff --git a/platform/native/ios/ios/iosUITests/Info.plist b/platform/native/ios/iosUITests/Info.plist similarity index 100% rename from platform/native/ios/ios/iosUITests/Info.plist rename to platform/native/ios/iosUITests/Info.plist diff --git a/platform/native/ios/ios/iosUITests/iosUITests.swift b/platform/native/ios/iosUITests/iosUITests.swift similarity index 100% rename from platform/native/ios/ios/iosUITests/iosUITests.swift rename to platform/native/ios/iosUITests/iosUITests.swift