Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fmylife

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fmylife

  • 0.6.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= FMyLife

  • http://www.carboni.ca/

== DESCRIPTION:

This gem allows the user to access the fmylife.com API, which includes reading stories, reading comments, moderating stories that are submitted, submitting stories, submitting comments, and searching for stories.

In addition, this gem lets you swap in and out which XML parser you use. Since not everyone can take advantage of compiled xml parsers, the typically built-in REXML library is available as well.

== FEATURES/PROBLEMS:

  • Full access to the fmylife.com API, including reading and submitting stories and submissions
  • Swap out which XML parser you want to use:
    • libxml-ruby
    • hpricot
    • nokogiri
    • REXML

== SYNOPSIS:

The following code will connect with your API key, authenticate as a user, grab a page of the latest stories and then download all the comments for the very latest story. Then, it will print the names of each comment's author.

acc = FMyLife::Account.new("yourapikey") acc.authenticate(username,password) latest = acc.latest.first # get the latest story acc.story(latest) # pull comments acc.comments.each do |comm| puts comm.author end

More interestingly, we should be able to submit stories!

story = FMyLife::Story.new(:text => "my life sucks. FML", :author => "Anonymous", :category => :love)

See the individual docs for more examples.

== REQUIREMENTS:

  • none, though one of the following is recommended:
    • hpricot
    • nokogiri
    • libxml-ruby

== INSTALL:

  • sudo gem install fmylife

== LICENSE:

(The MIT License)

Copyright (c) 2009 Michael J. Edgar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FAQs

Package last updated on 11 Jan 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc