logo

scripts

A bunch of scripts, some to be moved to their own repository git clone https://anongit.hacktivis.me/git/scripts.git/

direct_messages.py (387B)


  1. #!/usr/bin/python3
  2. # -*- encoding: utf-8 -*-
  3. from TwitterAPI import TwitterAPI, TwitterOAuth, TwitterRestPager
  4. o = TwitterOAuth.read_file('credentials.txt')
  5. api = TwitterAPI(
  6. o.consumer_key,
  7. o.consumer_secret,
  8. o.access_token_key,
  9. o.access_token_secret)
  10. def get_direct_messages():
  11. r = api.request('direct_messages/sent')
  12. print(r)
  13. if __name__ == "__main_":
  14. get_direct_messages()