Ruby on Rails SMS sending - ruby-on-rails

I'm trying to code for an sms server using this tutorial:
http://lukeredpath.co.uk/blog/sending-sms-messages-from-your-rails-application.html
Here they advice us to use clickatell but i have a gateway that i can use which i would like to use. However i wouldn't know how to write the bits of code that says require clickatel or sudo gem install clickatell. I'm new to ruby and rails hence any help would be appreciated :)

I have found twilio easy to use and recommend it. They have a tutorial that works (at least in Rails 3.07).
http://www.twilio.com/

Related

How to use rails gem to connect to API?

I'm trying to connect my RoR app to the api at this website https://www.humanapi.co
There is a gem available here, https://github.com/humanapi/humanapi, that is supposed to make the process easy. I have read through the documentation several times Unfortunately, because I am new to RoR and web development in general, I'm not exactly sure how to implement this. Any help you can give is greatly appreciated!
Specifically: It says to configure the initilizer using these values..
HumanApi.config do |c|
c.app_id = ENV['HUMANAPI_KEY']
c.query_key = ENV['HUMANAPI_SECRET']
end
I understand this in concept, i have used omniauth etc before. But do I need to create another initializer or just use an existing one?
and finally, this is what i don't understand the most...
humanizable :get_the_token
def get_the_token
# the code to reach the token
"# the code to reach the token
I'm at a complete loss with that, how would i get the token? here is the documentation for web access to the api (which i've read a lot) http://hub.humanapi.co/docs/connect-web-guide
Well, it's not your fault, the documentation of the gem is poorly written and doesn't show what exactly is going on or what is it even doing
This gem is also outdated, created 3 years ago and there are no issues or updates or anything. you better go looking for a different gem that do the functionality you want

Using Photobucket api with Ruby on Rails

I am trying to use Photobucket(API) as a image uploading option in my website.
Is there any available gem to do this? or should i use things like REST to achieve this?
Please suggest.
Thanks,
Balan
The only thing I really found was this https://bitbucket.org/photobucket/api-ruby/src/7b69e473fb9fd5b4d37e2ad7f266500e45ef524b/example.rb?at=default. They are using the oauth rubygem to talk to photobucket, still a lot of manual process involved. It is also still using REST.
I would say the easiest way it going ahead and using REST following http://pic.photobucket.com/dev_help/WebHelpPublic/PhotobucketPublicHelp.htm and http://pic.photobucket.com/dev_help/WebHelpPublic/Content/FAQ/FAQOverview.htm to get you started.
I haven't done a REST client in ruby but this gem looks pretty good https://github.com/rest-client/rest-client.
I would recommend, assuming you have the time, making a photobucket ruby gem and wrapping the REST calls in useful class abstractions. It is great for the community, forces you to follow good practices(to a certain extent) and will provide great experience to put on a resume/talk about in an interview.

trouble using juggernaut as a rails plugin

i am developing a rails plugin, in which i want a model where server will notify updates to all the connected clients. for simplicity say, on certain event server will say 'hi there is an update' to all the clients.
i came across juggernaut plugin that uses web-sockets and have followed https://github.com/maccman/juggernaut_plugin/tree/c3e07a812341f93bb1f90c00b7a125524b07b80a
but its not working for me.
can any one help me figuring out what am i missing, simply to send an alerts to the clients.
or is there some simpler library or simpler way to get on with it?
any suggestions/comments will be appreciated.
What about Faye? Here's a Railscasts screencast
juggernaut_plugin hasn't been updated for three years. You want Juggernaut, the much more recently and recently-updated version. Try following the instructions for that.

Twitter bot with Rails

I am trying to create a Twitter bot with Ruby on Rails but I just dont find any useful information on this manner...
Is it posible?
I tried with the GEM twibot but it is deprecated it is not longer useful.
Does Rails have a method for trigger events when (for example) a twit is posted?
Anyone have worked with something like this?
Any tutorial?
Any information at all that is in current use, I mean that does work today with the Twitter API (Many of the stuff I googled does not work now)?
Thank you very much.
Twitter itself is running on Rails, and it has a REST API. You could easily write your own solution with ActiveResource
You can get started with the ActiveResource videos on Railscasts
rails per se does not have any support for twitter. it's just an mvc-web-framework. but there are a lot of ruby gems for twitter. my favorite is this https://github.com/jnunemaker/twitter but you can find a lot more here https://www.ruby-toolbox.com/categories/api_clients.html

Using Phaxio with Rails 3.1 app

I am trying to use the Phaxio API to include the ability to send faxes to customers from my Rails app, however I am having difficulty trying to implement it. I know Phaxio is new and there doesn't seem to be much on it except for what is provided by their online docs, which don't really cover too much and have no examples using rails.
From what I can gather from their docs is that I need to send a request to https://api.phaxio.com/v1/send along with some parameters. In their example they use curl to do this but how would I do this from a rails controller? Is their any helper libraries out there for this or will I have to write it from scratch? I might be swinging in the dark here but any help on this subject matter would be greatly appreciated.
Thanks
I just sent over an email to you, but I'll post some example code here as well. We're currently working on a Ruby helper for Phaxio, but here's some code that should help you get started in the mean time.
You'll need to gem install mime-types first.
http://pastebin.com/jfTLn6Bq
-Josh Nankin
Co-Founder, Phaxio

Resources