Currently, the URI for an endpoint is stored as a variable called endpoint, which means $endpoint->endpoint is the way you access the URI. I think it could be confusing to developers, so I would recommend changing it to $endpoint->uri.

Comments

Anonymous’s picture

Adding tag for code sprint.

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new3.84 KB

The attached patch changes $endpoint->endpoint to $endpoint->uri. I have tested it with SPARQL Views module and it works. If no one objects, I'd like to commit this ASAP so that the API change is made before people start using it.

scor’s picture

I haven't had time to test it, but Looks good. Do you plan to deal with existing installations which already have endpoints registered?

Like you said, maybe standardizing on "URL" instead of URI is good.

Anonymous’s picture

Status: Needs review » Needs work

You're right, I need an update function that updates the table field to uri.

Unless anyone has objections, I'll switch to url.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new4.25 KB

In thinking about it more, it might be best to stick with URI. Entity API is using the term and I'm sure that we use it elsewhere, so if no one has any objections again, I'll stick with URI.

This patch adds an update function.

Anonymous’s picture

StatusFileSize
new4.25 KB

Small typo

Anonymous’s picture

StatusFileSize
new4.25 KB

Small typo

scor’s picture

patch looks good and includes update function and updated schema. +1

clayball’s picture

Status: Needs review » Reviewed & tested by the community

Patch worked for me. The sparql_registery db table updated successfully.
Based on scor's comment and my testing; changed status to RTBC.

Anonymous’s picture

Rad, thanks for the reviews guys! I'll be committing this tonight. I forgot to add a note in the CHANGELOG (which records any changes for UI or API), but I'll take care of that.

Anonymous’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again for the reviews, this is now fixed :)

Fixed with commit http://drupalcode.org/project/sparql.git/commit/edf4428

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sun.core’s picture