Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hummusonrails/dev_orbit
Integrate your DEV community interactions into your Orbit workspace
https://github.com/hummusonrails/dev_orbit
api-client devto orbit ruby ruby-gem
Last synced: 28 days ago
JSON representation
Integrate your DEV community interactions into your Orbit workspace
- Host: GitHub
- URL: https://github.com/hummusonrails/dev_orbit
- Owner: hummusonrails
- License: mit
- Created: 2021-03-07T14:04:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-03T06:02:18.000Z (over 3 years ago)
- Last Synced: 2024-10-10T20:49:27.711Z (about 1 month ago)
- Topics: api-client, devto, orbit, ruby, ruby-gem
- Language: Ruby
- Homepage:
- Size: 75.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# DEV.to Interactions to Orbit Workspace
![Build Status](https://github.com/bencgreenberg/dev_orbit/workflows/CI/badge.svg)
[![Gem Version](https://badge.fury.io/rb/dev_orbit.svg)](https://badge.fury.io/rb/dev_orbit)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)This is a Ruby gem that can be used to integrate your DEV interactions, like DEV comments on blog posts, into your organization's Orbit workspace.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'dev_orbit'
```## Usage
### Instantiation of the Client
To instantiate a DevOrbit client, you can either pass along your credentials for DEV and Orbit directly to the instantiation or retain them in your environment variables.
The following are the expected environment variables:
```ruby
ORBIT_API_KEY
ORBIT_WORKSPACE_ID
DEV_API_KEY
DEV_USERNAME
```With the credentials as environment variables:
```ruby
client = DevOrbit::Client.new
```Passing in the credentials directly into the instantiation:
```ruby
client = DevOrbit::Client.new(
orbit_api_key: '...',
orbit_workspace: '...',
dev_api_key: '...',
dev_username: '...'
)
```### Post New DEV Comments to Orbit Workspace
You can use the gem to get new DEV comments on your DEV user or organization by invoking the `#comments` method on your `client` instance:
```ruby
client.comments
```This method will fetch all your articles from DEV, gather their respective comments, filter them for anything within the past day, and then send them to your Orbit workspace via the Orbit API.
### Post New DEV Followers to Orbit Workspace
You can use the gem to get new DEV followers by invoking the `#followers` method on your `client` instance:
```ruby
client.followers
```You can run this either of those or any one of them as a daily cron job, for example, to add your newest DEV comments and/or followers as activities and members in your Orbit workspace.
### CLI
You can also use the built-in CLI to perform the following operations:
* Check for new DEV comments and post them to Orbit
```bash
$ ORBIT_API_KEY='...' ORBIT_WORKSPACE='...' DEV_API_KEY='...' DEV_USERNAME='...' bundle exec dev_orbit --check-comments
```* Check for new DEV followers and post them to Orbit
```bash
$ ORBIT_API_KEY='...' ORBIT_WORKSPACE='...' DEV_API_KEY='...' DEV_USERNAME='...' bundle exec dev_orbit --check-followers
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/bencgreenberg/dev_orbit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/bencgreenberg/dev_orbit/blob/master/CODE_OF_CONDUCT.md).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/bencgreenberg/dev_orbit/blob/master/CODE_OF_CONDUCT.md).