Giter VIP home page Giter VIP logo

clockwork-api-bundle's Introduction

ScribeClockworkBundle

Symfony bundle to handle interaction with clockworksms.com for SMS messaging

Requirements

Installation

Add the following to your composer.json file in the require block:

"scribe/clockwork-bundle": "dev-master"

Issue a composer.phar update to download your new package (this command will also update any outdated packages).

To register the bundle within your application, you must add the bundle to the AppKernel.php file within the $bundles array:

new Scribe\ClockworkBundle\ScribeClockworkBundle()

Configuration

Edit your symfony config.yml file and add, at a minimum, the following lines:

scribe_clockwork:
  api_key: your-api-key-goes-here

You may optionally configure the following items as well (show with their default values):

scribe_clockwork:
  api_key: your-api-key-goes-here
  allow_long_messages: false
  truncate_long_messages: true
  from_address: 'ScribeClock'
  enable_ssl: true
  invalid_character_action: replace_character
  log_activity: false

Usage

Assuming you have completed the installation and configuration, you can send a text message by requesting the scribe.clockwork service and using the send method.

$cw = $container->get('scribe.clockwork');
$message_id = $cw->send('12223334444', 'Your text message goes here');

More complex usage, including sending multiple messages, checking your balance, credit, and API key validity are also available.

License

Please see the LICENSE file distributed with this software.

clockwork-api-bundle's People

Stargazers

Angus H. avatar Jeroen Desloovere avatar

Watchers

James Cloos avatar  avatar Rob Frawley 2nd avatar  avatar

clockwork-api-bundle's Issues

PHP version missing in composer

Since this class only works when having PHP 5.4.0, the composer file should be updated:

"require": {
    "php": ">=5.4.0"
},

When you need to let this class work with PHP 5.3.0, you should replace all shortcodes [, ] by their long-version array()

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.