Closed CloCkWeRX closed 10 years ago
You should probably re-file this at http://github.com/rub-rdf/sparql-client, which is the actively maintained branch.
Bit annoying, can't seem to do that (log new issue or reassign). Have fired off a pull request for one fix I did, and could have sworn I fixed this on my local.
@gkellogg @bendiken ; think we could just add gkellogg as a contributor, so he can close off pull requests and what have you? https://github.com/bendiken/sparql-client/admin/collaboration ? Alternatively, look at transferring ownership or something?
Looks like the problem is fixed. The way to call is
sparql = SPARQL::Client.new(SPARQL_ENDPOINT, { "apikey" => "hi", :method => 'get' })
or for what I needed with 4store and soft-limit
sparql = SPARQL::Client.new(SPARQL_ENDPOINT, { "soft-limit" => "-1", :method => 'get' })
Reproduce steps:
sparql = SPARQL::Client.new("http://api.kasabi.com/dataset/foodista/apis/sparql?apikey=hi") sparql.inspect => #SPARQL::Client:0xc90810(http://api.kasabi.com/dataset/foodista/apis/sparql?apikey=hi)
sparql.query( "PREFIX dct: http://purl.org/dc/terms/ PREFIX f: http://linkedrecipes.org/schema/ PREFIX foaf: http://xmlns.com/foaf/0.1/ SELECT ?uri ?title ?recipePage WHERE { ?uri a f:Recipe; dct:title ?title; foaf:isPrimaryTopicOf ?recipePage; <ngredient http://data.kasabi.com/dataset/foodista/food/4CXZ7VHS; <ngredient http://data.kasabi.com/dataset/foodista/food/CX8CMQHZ. } LIMIT 10" )
=> SPARQL::Client::ClientError: HTTP/1.1 403 Forbidden
The fix should be easy enough - just altering https://github.com/bendiken/sparql-client/blob/master/lib/sparql/client.rb#L287 to merge, not replace query_values