https://github.com/ekohe/sourcescrub
A Ruby Wrapper based on SourceScrub API
https://github.com/ekohe/sourcescrub
api rest-api ruby sourcescrub
Last synced: 17 days ago
JSON representation
A Ruby Wrapper based on SourceScrub API
- Host: GitHub
- URL: https://github.com/ekohe/sourcescrub
- Owner: ekohe
- License: mit
- Created: 2020-06-18T14:51:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2026-05-07T10:33:25.000Z (about 2 months ago)
- Last Synced: 2026-05-07T12:33:28.327Z (about 2 months ago)
- Topics: api, rest-api, ruby, sourcescrub
- Language: Ruby
- Size: 129 KB
- Stars: 1
- Watchers: 3
- 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
# Sourcescrub
Sourcescrub is a ruby wrapper based on Source Scrub API, Here is API documentation: https://api.sourcescrub.com/index.html.
However, we need to request an access account from Sourcescrub.
[](https://badge.fury.io/rb/sourcescrub)
[](https://travis-ci.org/ekohe/sourcescrub)
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'sourcescrub'
```
And then execute:
$ bundle install
Or install it yourself as:
$ gem install sourcescrub
## Getting Started
#### Configure your certificate for API
```ruby
require 'sourcescrub'
account = YAML.load(File.read('sourcescrub.yml'))
Sourcescrub.account do |config|
config.username = account['username']
config.password = account['password']
config.basic = account['basic']
config.debug = false # Default is false, If you want to know the request information, can set the debug = true
end
```
## Usage
#### Class: `Client` for API
```
pry(main)> client = Sourcescrub::Client.new
```
#### Request your token
```
pry(main)> client.headers
=> {"Authorization"=>"Bearer eyJhbGciOiJSUzI1NiIsImtpZCI........"}
```
#### API request for endpoint we completed
- [Companies](https://github.com/ekohe/sourcescrub#companies)
- [Searches](https://github.com/ekohe/sourcescrub#searches)
```ruby
response = client.company('ekohe.com') # get data by domain
response = client.company('LZ281NVD') # get data by SS ID
response.as_json
```
### Companies
#### Get the company data by domain or Sourcescrub ID
```ruby
pry(main)> response = client.company('ekohe.com')
=> # #
pry(main)> response.name
=> "Ekohe, Ltd."
pry(main)> response.domain
=> "ekohe.com"
pry(main)> response.as_json
=> {:id=>"LZ281NVD",
:companyType=>"Private",
:name=>"Ekohe, Ltd.",
:informalName=>"Ekohe",
:website=>"https://ekohe.com",
:domain=>"ekohe.com",
:description=>
"Ekohe, Ltd. is a cutting-edge web and mobile design and development agency. It specialize in digital strategy, innovative technology and user-centered design experiences from conceptualization to market launch.",
:foundingYear=>2007,
:location=>"Xinzhuang, Shanghai Shi, China",
:city=>"Xinzhuang",
:state=>"Shanghai Shi",
:postalCode=>nil,
:country=>"China",
:parentCompanyDomain=>nil,
:phoneNumber=>"",
:specialties=>
["IT & Startup Consulting",
"Ruby on Rails leaders",
"Intelligent Web & Mobile Development",
"Usable Web & Mobile design",
"UX or UI Design",
"Artificial Intelligence",
"Machine Learning",
"Data Sourcing",
"FinTech Tools"],
:facebook=>nil,
:twitter=>nil,
:crunchbase=>nil,
:linkedIn=>"https://www.linkedin.com/company/ekohe",
:totalAmountInvested=>0,
:currentEmployeeCount=>41,
:currentEmployeeRange=>"11-50",
:currentJobOpenings=>0,
:investors=>"",
:personalTags=>[],
:firmTags=>[]}
```
### Searches
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ekohe/sourcescrub. 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/ekohe/sourcescrub/blob/master/CODE_OF_CONDUCT.md).
- [Encore](https://github.com/encoreshao)
## 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 Sourcescrub project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ekohe/sourcescrub/blob/master/CODE_OF_CONDUCT.md).