mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Indent description block
This commit is contained in:
parent
d85ca73857
commit
9634d42f2d
1 changed files with 23 additions and 24 deletions
|
@ -9,50 +9,50 @@ module Agents
|
|||
description <<-MD
|
||||
The TumblrPublishAgent publishes Tumblr posts from the events it receives.
|
||||
|
||||
To be able to use this Agent you need to authenticate with Tumblr in the [Services](/services) section first.
|
||||
To be able to use this Agent you need to authenticate with Tumblr in the [Services](/services) section first.
|
||||
|
||||
|
||||
|
||||
**Required fields:**
|
||||
**Required fields:**
|
||||
|
||||
`blog_name` Your Tumblr URL (e.g. "mustardhamsters.tumblr.com")
|
||||
`blog_name` Your Tumblr URL (e.g. "mustardhamsters.tumblr.com")
|
||||
|
||||
`post_type` One of [text, photo, quote, link, chat, audio, video]
|
||||
`post_type` One of [text, photo, quote, link, chat, audio, video]
|
||||
|
||||
|
||||
-------------
|
||||
-------------
|
||||
|
||||
You may leave any of the following optional fields blank. Including a field not allowed for the specified `post_type` will cause a failure.
|
||||
You may leave any of the following optional fields blank. Including a field not allowed for the specified `post_type` will cause a failure.
|
||||
|
||||
**Any post type**
|
||||
**Any post type**
|
||||
|
||||
* `state` published, draft, queue, private
|
||||
* `tags` Comma-separated tags for this post
|
||||
* `tweet` off, text for tweet
|
||||
* `date` GMT date and time of the post as a string
|
||||
* `format` html, markdown
|
||||
* `slug` short text summary at end of the post URL
|
||||
* `state` published, draft, queue, private
|
||||
* `tags` Comma-separated tags for this post
|
||||
* `tweet` off, text for tweet
|
||||
* `date` GMT date and time of the post as a string
|
||||
* `format` html, markdown
|
||||
* `slug` short text summary at end of the post URL
|
||||
|
||||
**Text** `title` `body`
|
||||
**Text** `title` `body`
|
||||
|
||||
**Photo** `caption` `link` `source`
|
||||
**Photo** `caption` `link` `source`
|
||||
|
||||
**Quote** `quote` `source`
|
||||
**Quote** `quote` `source`
|
||||
|
||||
**Link** `title` `url` `description`
|
||||
**Link** `title` `url` `description`
|
||||
|
||||
**Chat** `title` `conversation`
|
||||
**Chat** `title` `conversation`
|
||||
|
||||
**Audio** `caption` `external_url`
|
||||
**Audio** `caption` `external_url`
|
||||
|
||||
**Video** `caption` `embed`
|
||||
**Video** `caption` `embed`
|
||||
|
||||
|
||||
-------------
|
||||
-------------
|
||||
|
||||
[Full information on field options](https://www.tumblr.com/docs/en/api/v2#posting)
|
||||
[Full information on field options](https://www.tumblr.com/docs/en/api/v2#posting)
|
||||
|
||||
Set `expected_update_period_in_days` to the maximum amount of time that you'd expect to pass between Events being created by this Agent.
|
||||
Set `expected_update_period_in_days` to the maximum amount of time that you'd expect to pass between Events being created by this Agent.
|
||||
MD
|
||||
|
||||
def validate_options
|
||||
|
@ -98,7 +98,6 @@ Set `expected_update_period_in_days` to the maximum amount of time that you'd ex
|
|||
incoming_events.each do |event|
|
||||
blog_name = interpolated(event)['blog_name']
|
||||
post_type = interpolated(event)['post_type']
|
||||
logger.error interpolated(event)
|
||||
options = interpolated(event)['options']
|
||||
begin
|
||||
post = publish_post(blog_name, post_type, options)
|
||||
|
|
Loading…
Add table
Reference in a new issue