All Projects → TailorBrands → noun-project-api

TailorBrands / noun-project-api

Licence: MIT License
A Ruby API wrapper for The Noun Project API's

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to noun-project-api

eva icons flutter
Flutter package for Eva Icons. Eva Icons is a pack of more than 480 beautifully crafted Open Source icons for common actions and items. https://pub.dartlang.org/packages/eva_icons_flutter
Stars: ✭ 80 (+263.64%)
Mutual labels:  icons
PaintCode2Skia
Convert your PaintCode app drawings (Android java export) to SkiaSharp C# code
Stars: ✭ 39 (+77.27%)
Mutual labels:  icons
Clarity
Customizable Monoshape Vector Icon Theme for GTK+
Stars: ✭ 37 (+68.18%)
Mutual labels:  icons
web-icons
It's a full suite of popular web icons for easy scalable vector graphics on websites.
Stars: ✭ 30 (+36.36%)
Mutual labels:  icons
pixelarticons
Beautiful pixel icons. For the pixel vibes.
Stars: ✭ 114 (+418.18%)
Mutual labels:  icons
chart-type-icon
An icon library that covers the vast majority of chart types
Stars: ✭ 33 (+50%)
Mutual labels:  icons
ReactNativeStarterKits
Agiletech React Native Starter Kits
Stars: ✭ 21 (-4.55%)
Mutual labels:  icons
mdue
5,400+ Material Design Icons for Vue 3 from the Community
Stars: ✭ 27 (+22.73%)
Mutual labels:  icons
blade-simple-icons
A package to easily make use of Simple Icons in your Laravel Blade views.
Stars: ✭ 12 (-45.45%)
Mutual labels:  icons
la-capitaine-android
📱 La Capitaine icons on Android!
Stars: ✭ 17 (-22.73%)
Mutual labels:  icons
icons-flat-osx
Free Flat icons For OSX
Stars: ✭ 371 (+1586.36%)
Mutual labels:  icons
Appstract
🎴 Abstract Android icon pack built on CandyBar dashboard
Stars: ✭ 46 (+109.09%)
Mutual labels:  icons
small-open-datasets
A collection of automatically-updated, ready-to-use and open-licensed datasets
Stars: ✭ 32 (+45.45%)
Mutual labels:  icons
mojoicons
Handcrafted 100 Outline and Flat Icons for Free -
Stars: ✭ 23 (+4.55%)
Mutual labels:  icons
aurelia-fontawesome
Font Awesome 5 Aurelia component
Stars: ✭ 15 (-31.82%)
Mutual labels:  icons
simple-icons-pdf
PDF icons for popular brands
Stars: ✭ 16 (-27.27%)
Mutual labels:  icons
iconplus
Produce icons with extra effect like long shadow, flat shadow, box effect, circle effect and rounded rectangle effect. It support Dynamic text, Font-awesome icons and also google materialized icon. You can make any Font-awesome icon as line icon and add attractive effect to it dynamically. As a output you will get CSS3 code and also you can expo…
Stars: ✭ 34 (+54.55%)
Mutual labels:  icons
react-heroicons
Heroicons as React components
Stars: ✭ 39 (+77.27%)
Mutual labels:  icons
hs-icons
Hearthstone vector icons
Stars: ✭ 36 (+63.64%)
Mutual labels:  icons
Material.Icons.Avalonia
Avalonia control for display material icons from Material.Icons: https://github.com/SKProCH/Material.Icons
Stars: ✭ 19 (-13.64%)
Mutual labels:  icons

The Noun Project Ruby API Wrapper

A Ruby API wrapper for The Noun Project API's

Gem Version

gem "noun-project-api", "~> 3.1.0", require: "noun_project_api"

Missing

Current version only wraps the Icon/Icons API's. Feel free to send a pull request with more API's wrapped!

Usage

You need a valid pair of token and secret to use the Gem, you can get these by signing up here

Raises ArgumentError on bad arguments

Configuration

You can use an initializer for example if you're on Rails.

# initializers/noun_project_api.rb
NounProjectApi.configure do |config|
  # Will only show public domain icons when running in dev/test envs
  config.public_domain = ['development', 'test'].include?(ENV['RAILS_ENV'])
end

Cache setup (needs to be an ActiveSupport::Cache::Store)

  config.cache = Rails.cache
  config.cache_ttl = 20 # seconds

Defaults to Null store and 1 week TTL.

Find single icon

Initialize

icon_finder = NounProjectApi::IconRetriever.new(token, secret)

Find an Icon by id source

result = icon_finder.find(1) # Returns a hash of the parsed JSON result.

Find an Icon by slug source

result = icon_finder.find_by_slug('globe') # Returns a hash of the parsed JSON result.

Search icons

Initialize

icons_finder = NounProjectApi::IconsRetriever.new(token, secret)

Optional arguments for both methods are limit, offset and page

Find Icons source

result = icons_finder.find('cat') # Returns an array of the parsed JSON results.

Get recent Icons source

result = icons_finder.recent_uploads # Returns an array of the parsed JSON results.

Find a collection of icons

Initialize

collection_finder = NounProjectApi::CollectionRetriever.new(token, secret)

Find a Collection by id source

result = collection_finder.find(1) # Returns a hash of the parsed JSON result.

Find a Collection by slug source

result = collection_finder_finder.find_by_slug('national-park-service') # Returns a hash of the parsed JSON result.

Resulting objects

The resulting object is either a NounObjectApi::Icon or an array of ones.

result.class # NounProjectApi::Icon
result.id # 1
result.public_domain? # true/false
result.svg_url # url/nil
result.preview_url # 200 size preview url
result.preview_url(42) # 42 size preview url

# You can always access the original Hash at
result.original_hash

Disclaimer

This is completely unofficial and is not related to The Noun Project in any way.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About Tailor Brands

Check us out!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].