
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
While a lot of the core code has remained unchanged, this fork has went through many updates to get it working with the latest version (1.0) of the Stack Exchange API. Many thanks to radar for this initial work on this project.
# Currently installs outdated version of the gem
# sudo gem install stacked
Stacked is configurable to work with any of the Stack Exchange sites. When setting up the client, just specify the site you wish to access, the API version number, and your api key. By default, Stacked will access Stack Overflow API version 1.0. Note: You must still supply your own api key in the config.
# Access Stack Overflow API v1.0
Stacked::Client.configure do |config|
config.api_key = 'yourapikey'
end
# Access Server Fault API v1.0
Stacked::Client.configure do |config|
config.site = 'serverfault.com',
config.version = '1.0',
config.api_key = 'yourapikey'
end
Methods that are designed to take options in the API are designed that way in the wrapper also, as you'd expect. For more details, read the Stack Overflow API documentation.
require 'stacked'
# - - Questions / Answers / Comments
# Setup the client
Stacked::Client.configure do |config|
config.api_key = 'yourapikey' # required
end
# Returns 30 (default page size) questions based on activity (default sort option)
Stacked::Question.all
# Returns questions tagged with 'ruby', including the question body and comments
Stacked::Question.all(:tagged => 'ruby', :body => true, :comments => true)
# Returns a individual question by id
question = Stacked::Question.find(151338)
# Returns paged answers for the question
answers = question.answers
# Returns paged comments for the question
comments = question.comments
# You can also specify multiple ids as an array for all find requests
questions = Stacked::Question.find([151338, 4579074])
# Returns paged questions based on search criteria
Stacked::Question.search(:intitle => 'github', :tagged => 'ruby')
# - - Users
# Returns the specified user
skeet = Stacked::User.find(22656)
# Returns all badges awarded to the user
skeet.badges
For additional details, checkout the latest generated documentation.
FAQs
Unknown package
We found that stacked demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.