Skip to content

ResearchSpace app to provide lookups against the SARI RDS lookup endpoint

Notifications You must be signed in to change notification settings

villaitatti/sengrid-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

N.b. This version requires this version of RS. At the current time, it has not been merged into the master branch yet.

Add the sengrid-test app to an instance of RS. Update config/repositories/sengrid.ttl and add these three lines inside the reposail:sailImpl node:

<http://www.researchspace.org/resource/system/ephedra#authKey> "Authorization";
<http://www.researchspace.org/resource/system/ephedra#authLocation> "header";
<http://www.researchspace.org/resource/system/ephedra#authValue> "Bearer {your token here}";

Executing queries

With a running instance of RS execute the following query against sengrid

PREFIX Platform: <http://www.researchspace.org/resource/system/>
PREFIX rso: <http://www.researchspace.com/resource/assets/Ontologies/researchspace#>

select * where {
	?s  rso:hasToEmail "[email protected]";
    	rso:hasFromEmail "[email protected]";
     	rso:hasSubject "Sending with RS is even more funnier than SendGrid";
        rso:hasContentType "text/plain";
        rso:hasContentValue "and easy to do";
}

The email is now sent. N.b. Sengrid returns an empty message on success. This throws an error when receiving the response. If Sengrid allows any kind of response customization, this may be solved. Otherwise, there will be another Researchspace update solving this issue.

About

ResearchSpace app to provide lookups against the SARI RDS lookup endpoint

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published