Skip to content

Follow Twitter guidelines for media upload by conforming to the "STATUS"#9261

Merged
balloob merged 1 commit into
home-assistant:devfrom
MikeChristianson:twitter-improved-media-upload
Sep 6, 2017
Merged

Follow Twitter guidelines for media upload by conforming to the "STATUS"#9261
balloob merged 1 commit into
home-assistant:devfrom
MikeChristianson:twitter-improved-media-upload

Conversation

@MikeChristianson
Copy link
Copy Markdown
Contributor

Replacement for #8992. Building on the Twitter notification support added in #8282:

Follow Twitter guidelines for media upload by conforming to the "STATUS" phase, when required, and by providing "media_category" information. These changes will, for example, allow users to upload videos that exceed the basic 30 second limit.

notify:
  - name: twitter
    platform: twitter
    consumer_key: 
    consumer_secret: 
    access_token: 
    access_token_secret: 

automation twitter:
  alias: Send a test message
  initial_state: True
  hide_entity: False
  trigger:
    platform: homeassistant
    event: start
  action:
    - service: notify.twitter
      data:
        message: "Test at {{ now().strftime('%I:%M:%S %p') }}."
        data:
          media: /tmp/my-awesome-video.mp4
#          media: /tmp/my-awesome-gif.gif
#          media: /tmp/my-awesome-image.jpg
    - service: homeassistant.turn_off
      entity_id: automation.send_a_test_message

…US" phase, when required, and by providing "media_category" information. These will, for example, allow users to upload videos that exceed the basic 30 second limit.

See:
 - https://twittercommunity.com/t/media-category-values/64781/7
 - https://twittercommunity.com/t/duration-too-long-maximim-30000/68760
 - https://dev.twitter.com/rest/reference/get/media/upload-status.html
@mention-bot
Copy link
Copy Markdown

@MikeChristianson, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fabaff, @HydrelioxGitHub and @pvizeli to be potential reviewers.

@MikeChristianson
Copy link
Copy Markdown
Contributor Author

@pvizeli @balloob @andrey-git This is ready, now. Replaces #8992.

@balloob balloob merged commit e7a5f7b into home-assistant:dev Sep 6, 2017
@balloob
Copy link
Copy Markdown
Member

balloob commented Sep 6, 2017

Nice! 🐬

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants