GithubHelp home page GithubHelp logo

barrettotte / rpgle-twilio Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 30 KB

RPGLE service program for sending text messages with Twilio SMS API

License: MIT License

RPGLE 100.00%
rpgle ibmioss twilio-api ibmi rpg ile twilio-sms-api

rpgle-twilio's Introduction

RPGLE-Twilio-SMS

A really basic RPGLE service program to send a text with the Twilio SMS API.

This is my introduction to making service programs, so its probably not great. Originally I was going to submit this to the Twilio Hackathon at DEV, but I decided I would just keep this as a small learning project instead.

Summary

The service program has two procedures, sendSms and sendSmsVerbose.

  • sendSms accepts 'simple' parms and returns an error code.
  • sendSmsVerbose accepts a request data structure and returns the response as a data structure.

Additionally, each procedure logs the Twilio request/response to sql/sms_log.sql. The service program is really only a wrapper over top of a stored procedure I wrote, sql/send_sms.sql.

Setup

  • Setup Twilio account and a Twilio phone number - https://www.twilio.com/
  • Connect to IBMi via SSH - ssh USER@YOUR400
  • Clone project - git clone https://github.com/barrettotte/RPGLE-Twilio.git
  • Navigate to project - cd RPGLE-Twilio
  • Give permissions to build script - chmod u+x build.sh
  • Run build script - ./build.sh
  • The build script will create the following
    • A Library named TWILIO to hold all of the Twilio objects
    • A Log table for logging SMS requests - sms_log
    • A simplified view over the log table -> sms_log_v
    • A stored procedure to call Twilio SMS API -> send_sms
    • An RPGLE service program to call Twilio SMS API -> ctl-opt bnddir('TWILIO/TWILIO') actgrp(*new);
  • Example call in example/src/testtwilio.sqlrpgle

Commands

  • give permissions to build script and build project - chmod u+x build.sh & ./build.sh
  • git push - git -c http.sslVerify=false push origin master

References

rpgle-twilio's People

Contributors

barrettotte avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rpgle-twilio's Issues

Execution issue

Please can you give me the steps to running on my as400 system.

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.