Giter Club home page Giter Club logo

gmailr's Introduction

gmailr

Build Status Coverage Status

Easily exposing the Gmail API from R.

Features

  • retrieve data from your email
    • drafts: my_drafts = drafts()
    • history: my_history = history(start_num)
    • labels: my_labels = labels()
    • messages: my_messages = messages("search query")
    • threads: my_threads = threads("search query")
  • Create and send emails and drafts: see sending_messages vignette
  • manage email labels programmatically: modify_thread(thread_id, add_labels=c("label_1"), remove_labels=c("label_2"))
  • put things in the gmail trash
    • messages: trash_message(message_id)
    • threads: trash_thread(thread_id)
  • take things out of the gmail trash
    • messages: untrash_message(message_id)
    • threads: untrash_thread(thread_id)
  • delete directly without using the trash
    • messages: delete_message(message_id)
    • threads: delete_thread(thread_id)

Setup

  • Register a new project at https://cloud.google.com/console#/project

  • Navigate to APIs

    • Switch the Gmail API status to On, and other API status to Off
  • Navigate to APIs & auth->Consent screen

    • Name your application
    • Select an email address for the application
    • Other fields can be left blank
  • Navigate to APIs & auth->Credentials

    • Create a new client ID
      • Application Type: Installed Application
      • Installed Application Type: Other
    • Download the Client ID JSON - can be renamed!
  • Use the downloaded JSON file as input to gmail_auth()

    ```R
    gmail_auth('file.json')
    ```
    

Furture Work

  • More unit tests and better coverage
  • More (complicated) example is the manual/help
  • Generate statistics
  • Mass emailers
  • Periodic emails
  • Returning data frames in addition to native Gmail API objects which are usually a nested list.
  • Support all the formats of users.messages:get

Examples

gmailr's People

Contributors

jimhester avatar alkashef avatar

Watchers

James Cloos avatar Diogo Silveira Mendonça avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.