Skip to content
Snippets Groups Projects

dspace client test

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Mauricio Giacomini Girardello
    test_client.rb 517 B
    class Test
    
      def self.create_client
        dspace_client = Dspace::Client.new(dspace_api: config['link'])
        dspace_client.login config['login'], config['password']
        dspace_client
      end
    
      private
    
      def self.config
        {'link' => "https://mecdb3.c3sl.ufpr.br:8443", 'login' => "admin@mecdb3.c3sl.ufpr.br", 'password' => 'admin'}
      end
    
    end
    
    item= Dspace::Item.new({
                               'name' => 'testeeeee'
                           })
    dspace = Test.create_client
    p dspace.collections.create_item(item, id: 4)
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment