Project

stashboxr

0.0
No commit activity in last 3 years
No release in over 3 years
Upload files to stashbox.org and manage their metadata. User accounts or anonymous uploads!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.0.0
 Project Readme

StashboxR¶ ↑

Original name, I know. This gem will let you communicate with stashbox.org via Ruby.

You can upload files and edit their metadata with either an anonymous or registered account. You can even delete files you own, should you so desire!

Usage¶ ↑

s = Stashboxr::File.new("http://stashbox.org/922233/5.jpg")
# => <Stash: 5.jpg (public)>
s.title
# => nil
s.title = "Not my file"
# RuntimeError: You don't have permission to edit this file
s = Stashboxr::File.upload("a textfile.txt")
# RuntimeError: The upload wasn't allowed because 'Anonymous users are restricted to image uploads..'
Stashboxr.login("myusername","mypassword")
# => true
s = Stashboxr::File.upload("textfile.txt")
# => <Stash: textfile.txt>
s.tags = ["one","spaces won't go thru","a4"]
# => ["one","spaces_won_t_go_thru","a4"]
s.add_tag("hello")
# => ["one","spaces_won_t_go_thru","a4","hello"]

Stashboxr.search("a4")
# => [<Stash: textfile.txt>]

Todo¶ ↑

  • Add the feature to input a know code for a specific file so it can be edited at a later date

  • Figure out why the know code isn’t returned when the API is used to upload a file

  • Bad logins not detected properly