Add quick examples for icon selection to README
This commit is contained in:
parent
c98efb9171
commit
857533eb6c
20
README.md
20
README.md
@ -8,7 +8,7 @@ back to parsing HTML if necessary.
|
|||||||
|
|
||||||
Add this line to your application's Gemfile:
|
Add this line to your application's Gemfile:
|
||||||
|
|
||||||
```gem 'manifique'```
|
gem 'manifique'
|
||||||
|
|
||||||
And then execute:
|
And then execute:
|
||||||
|
|
||||||
@ -30,9 +30,25 @@ agent = Manifique::Agent.new(url: "https://kosmos.social")
|
|||||||
Now you can fetch its metadata:
|
Now you can fetch its metadata:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
puts agent.fetch_metadata
|
metadata = agent.fetch_metadata
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Selecting icons
|
||||||
|
|
||||||
|
Let's select an icon that we like:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
icon = metadata.select_icon(type: "image/png", sizes: "96x96")
|
||||||
|
```
|
||||||
|
|
||||||
|
Or maybe just iOS icons? They're pretty convenient for postprocessing after all.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
icon = metadata.select_icon(purpose: "apple-touch-icon", sizes: "180x180")
|
||||||
|
```
|
||||||
|
|
||||||
|
_TODO check out the docs for options and behavior._
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user