The project is in a healthy, maintained state
This gem provides a Ruby interface to the StarDots platform, allowing developers to easily manage spaces, upload files, and interact with the StarDots API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.6
~> 3.12
~> 1.50
~> 0.22
~> 3.18
~> 0.9

Runtime

~> 0.21
~> 2.6
 Project Readme

logo.png

StarDots-SDK-Ruby

Build Status LICENSE: MIT
Ruby Gem

Introduction

This project is used to help developers quickly access the StarDots platform and is written in Ruby.

Requirement

  • Ruby version >= 2.6.0

Installation

# Install from RubyGems
gem install stardots-sdk-ruby

# Or add to your Gemfile
gem 'stardots-sdk-ruby'

# Or install from source
git clone https://github.com/stardots-io/stardots-sdk-ruby.git
cd stardots-sdk-ruby
bundle install

Quick Start

require 'stardots_sdk'

# Initialize the client
client_key = "Your client key"
client_secret = "Your client secret"
client = StardotsSdk::Client.new(client_key, client_secret)

# Get space list
space_list = client.get_space_list

# Create a new space
create_params = StardotsSdk::CreateSpaceReq.new(space: "my-space", public: true)
create_result = client.create_space(create_params)

# Upload a file
upload_params = StardotsSdk::UploadFileReq.new(
  filename: "example.txt",
  space: "my-space",
  file_content: "Hello, StarDots!"
)
upload_result = client.upload_file(upload_params)

Examples

See the examples directory for more detailed usage examples:

  • Basic Usage - Complete example showing all API operations

API Reference

  • StardotsSdk::Client.new(client_key, client_secret, endpoint = nil) - Create a new client instance
  • client.get_space_list(params = SpaceListReq.new) - Get space list
  • client.create_space(params) - Create a new space
  • client.delete_space(params) - Delete an existing space
  • client.toggle_space_accessibility(params) - Toggle space accessibility
  • client.get_space_file_list(params) - Get space file list
  • client.file_access_ticket(params) - Get file access ticket
  • client.upload_file(params) - Upload file to space
  • client.delete_file(params) - Delete files from space

Request/Response Types

  • SpaceListReq / SpaceListResp - Space list operations
  • CreateSpaceReq / CreateSpaceResp - Space creation
  • DeleteSpaceReq / DeleteSpaceResp - Space deletion
  • ToggleSpaceAccessibilityReq / ToggleSpaceAccessibilityResp - Space accessibility toggle
  • SpaceFileListReq / SpaceFileListResp - File list operations
  • FileAccessTicketReq / FileAccessTicketResp - File access ticket
  • UploadFileReq / UploadFileResp - File upload
  • DeleteFileReq / DeleteFileResp - File deletion

Development

# Install dependencies
bundle install

# Run tests
bundle exec rspec

# Run linting
bundle exec rubocop

# Build gem
gem build stardots-sdk-ruby.gemspec

Documentation

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support