Giter Club home page Giter Club logo

feathers-twilio's Introduction

feathers-twilio

Important: This module is no longer maintained

Build Status Dependency Status Download Status Greenkeeper badge

A Twilio Service for FeatherJS.

Still a WIP

Installation

npm install twilio feathers-twilio --save

Documentation

In progress

Complete Example

License

Copyright (c) 2016

Licensed under the MIT license.

Changelog

0.1.0

  • Initial release

License

Copyright (c) 2019

Licensed under the MIT license.

feathers-twilio's People

Contributors

corymsmith avatar daffl avatar ekryski avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

feathers-twilio's Issues

Add support for twilio-chat

Twilio Chat is one of the latest products from twilio. And would be a great addition to this repo.
https://www.twilio.com/chat

We use it extensively in my company. Though the legacy systems still run on python for it, we're planning a migration to NodeJS in some time.

I'd be happy to contribute to this repo. Though I feel the current dependencies are quite outdated, and I will have to use the latest twilio-node client for it. Issue is I don't have any experience of working with SMS or calls on twilio, so maybe someone else will have to do the migration for them as I upgrade to the latest client for twilio chat.

There are few other things in my mind to discuss.

@daffl @ekryski Let me know if there is any interest for this.

Update API library and use Common API

This service is using an outdated version of the Twilio API library. I've looked a little bit into the new API, but I'm really not sure how to update this service to be compatible with the Feathers Common API, so I'm collecting some perhaps useful information here in hopes someone else might take a look.

Twilio API docs

Twilio Paging Information docs

image

Twilio messages stream docs

image

Twilio's API library repository docs showing how to use this.list:

this.list uses this.each internally:

Pseudo code for sms.js

Here I'm trying to handle pagination based off the mongoose service and what Twilio supports:

class Service {
  constructor (options = {}) {
    if (!options.accountSid) {
      throw new Error('Twilio `accountSid` needs to be provided');
    }

    if (!options.authToken) {
      throw new Error('Twilio `authToken` needs to be provided');
    }

    this.from = options.from || null;
    this.paginate = options.paginate || {};
    
    const twilio = new Twilio(options.accountSid, options.authToken);
    this.client = twilio.messages;
  }

  find (params) {
    const paginate = (params && typeof params.paginate !== 'undefined') ? params.paginate : this.paginate;
    const result = this._find(params, !!paginate.default,
      query => filterQuery(query, paginate)
    );

    return result;
  }

  _find (params, count, getFilter = filterQuery) {
    const { filters, query } = getFilter(params.query || {});

    let opts = {};

    if (count) {
      // Handle $limit
      if (typeof filters.$limit !== 'undefined') {
        opts = {
          limit: filters.$limit,
          pageSize: this.paginate.max
        }; 
      } else {
        opts = {
          limit: this.paginate.default,
          pageSize: this.paginate.max
        };
      }
    }

    return new Promise((resolve, reject) => {
      return this.client.list(opts).then(resolve).catch(reject);
    });
  }

// Note: I'm really not sure about this code or how to connect Twilio to Feathers.

Feathers pagination:

I'm not sure to what extent this idea of pagination can be supported?

Seeing as the new Twilio API is "streaming" I don't know how that changes things.

statusCallback

Users might want to be able to pass extra options like a statusCallback URL:

EDIT:

An in-range update of @feathersjs/express is breaking the build 🚨

The devDependency @feathersjs/express was updated from 4.3.10 to 4.3.11.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@feathersjs/express is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.3.11

4.3.11 (2019-11-11)

Bug Fixes

  • authentication: Retain object references in authenticate hook (#1675) (e1939be)
  • authentication-oauth: Allow hash based redirects (#1676) (ffe7cf3)
Commits

The new version differs by 7 commits.

  • 2d95bfd chore(release): publish v4.3.11
  • 079937c chore(package): Add npm funding field (#1678)
  • ffe7cf3 fix(authentication-oauth): Allow hash based redirects (#1676)
  • e1939be fix(authentication): Retain object references in authenticate hook (#1675)
  • 1ebc58e chore(package): update @types/config to version 0.0.36 (#1669)
  • 43c654c Add GitHub sponsorship
  • b0f5653 chore: Update version and changelog

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @feathersjs/feathers is breaking the build 🚨

The devDependency @feathersjs/feathers was updated from 4.3.10 to 4.3.11.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@feathersjs/feathers is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.3.11

4.3.11 (2019-11-11)

Bug Fixes

  • authentication: Retain object references in authenticate hook (#1675) (e1939be)
  • authentication-oauth: Allow hash based redirects (#1676) (ffe7cf3)
Commits

The new version differs by 7 commits.

  • 2d95bfd chore(release): publish v4.3.11
  • 079937c chore(package): Add npm funding field (#1678)
  • ffe7cf3 fix(authentication-oauth): Allow hash based redirects (#1676)
  • e1939be fix(authentication): Retain object references in authenticate hook (#1675)
  • 1ebc58e chore(package): update @types/config to version 0.0.36 (#1669)
  • 43c654c Add GitHub sponsorship
  • b0f5653 chore: Update version and changelog

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @feathersjs/errors is breaking the build 🚨

The dependency @feathersjs/errors was updated from 4.3.10 to 4.3.11.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@feathersjs/errors is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.3.11

4.3.11 (2019-11-11)

Bug Fixes

  • authentication: Retain object references in authenticate hook (#1675) (e1939be)
  • authentication-oauth: Allow hash based redirects (#1676) (ffe7cf3)
Commits

The new version differs by 7 commits.

  • 2d95bfd chore(release): publish v4.3.11
  • 079937c chore(package): Add npm funding field (#1678)
  • ffe7cf3 fix(authentication-oauth): Allow hash based redirects (#1676)
  • e1939be fix(authentication): Retain object references in authenticate hook (#1675)
  • 1ebc58e chore(package): update @types/config to version 0.0.36 (#1669)
  • 43c654c Add GitHub sponsorship
  • b0f5653 chore: Update version and changelog

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

An in-range update of @feathersjs/socketio is breaking the build 🚨

The devDependency @feathersjs/socketio was updated from 4.3.10 to 4.3.11.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@feathersjs/socketio is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.3.11

4.3.11 (2019-11-11)

Bug Fixes

  • authentication: Retain object references in authenticate hook (#1675) (e1939be)
  • authentication-oauth: Allow hash based redirects (#1676) (ffe7cf3)
Commits

The new version differs by 7 commits.

  • 2d95bfd chore(release): publish v4.3.11
  • 079937c chore(package): Add npm funding field (#1678)
  • ffe7cf3 fix(authentication-oauth): Allow hash based redirects (#1676)
  • e1939be fix(authentication): Retain object references in authenticate hook (#1675)
  • 1ebc58e chore(package): update @types/config to version 0.0.36 (#1669)
  • 43c654c Add GitHub sponsorship
  • b0f5653 chore: Update version and changelog

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.