update README.md

parent 0ce54e83
......@@ -37,6 +37,14 @@ client.communities.create(Dspace::Community.new({'name' => 'Testando'}))
# get a bitstream and your file
bitstream = client.bitstreams.find(id: 20, expand: 'parent')
tmp_file = client.bitstreams.retrieve(id: 20) #<Tempfile:/tmp/..._teste.jpg>
# creating a new bitstream for some item
file = File.new('/your/path/Pictures/Celular/some_book.pdf', 'r')
bitstream = client.items.add_bitstream(file, id: 11, name: 'some_book.pdf', description: 'testing upload a pdf book')
# updating bitstream metadata
bitstream.name = 'new_book_name.pdf'
client.bitstreams.update(bitstream, id: bitstream.id)
```
To see more examples, visit our Wiki.
......@@ -47,5 +55,4 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
## Contributing
Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration.
Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment