social_post_twitter.settings_form:
  path: '/admin/config/social-api/social-post/twitter'
  defaults:
    _title: 'Twitter Settings'
    _form: 'Drupal\social_post_twitter\Form\TwitterPostSettingsForm'
  requirements:
    _permission: 'administer social api autoposting'

# User collection route.
social_post_twitter.user.collection:
  path: '/admin/config/social-api/social-post/twitter/users'
  defaults:
    _controller: 'Drupal\social_post_twitter\Controller\TwitterPostController::buildList'
    provider: 'twitter'
  requirements:
    _permission: 'view social post user entities'

# Routes for authentication
social_post_twitter.redirect:
  path: '/user/social-post/twitter/auth'
  defaults:
    _controller: 'Drupal\social_post_twitter\Controller\TwitterPostController::redirectToProvider'
  requirements:
    _permission: 'perform twitter autoposting tasks'
  options:
    no_cache: TRUE

social_post_twitter.callback:
  path: '/user/social-post/twitter/auth/callback'
  defaults:
    _controller: 'Drupal\social_post_twitter\Controller\TwitterPostController::callback'
  requirements:
    _permission: 'perform twitter autoposting tasks'
  options:
    no_cache: TRUE
