GroupMe! API
Note: We are re-engineering the GroupMe! API at the moment! The old Export API
(endpoint: http://groupme.org/GroupMe/api/export.do) and the
corresponding Java Client API will still work in the future.
GroupMe! API
The new GroupMe! API is still in development at the moment. A selection of new API methods can already be tested.
The endpoint of the new API is http://groupme.org/GroupMe/api.do
API Methods
Parameter used to specify the method that should be executed: method
groupme.search
The search methods allow to search for GroupMe! groups and resources. We provide the following search methods:
groupme.search- Performs a search for resources and groups.groupme.search.groups- Performs a search for groups only.groupme.search.resources- Performs a search for resources only.
Parameters and options for GroupMe! search methods:
tag- Mandatory parameter, which allows to specify tags/keywords that should be used as search query. For search methods the specification of at least one tag is mandatory.conjunction- Optional parameter, which enables you to specify how multiple tags are connected. Allowed values:orandand. If no conjunction is given then the tags are used as OR-connected query.offset- Optional parameter, which allows to specify how many results of the top k results should be skipped (not returned).limit- Optional parameter, which allows to limit the number of returned results.output- Optional parameter, which allows to specify which output format should be used. Allowed values:xml. Standard output:xml.
Examples:
- http://groupme.org/GroupMe/api.do?method=groupme.search&tag=web&tag=iswc - Returns GroupMe! groups and resources, which are related to web or iswc. XML is used as standard output format so that the result looks as follows:
<?xml version="1.0" encoding="ISO-8859-1"?> <result query="web, iswc" time="Wed May 07 19:57:14 CEST 2008"> <resource rank="1" uri="http://groupme.org/GroupMe/resource/111" weburl="http://iswc2007.semanticweb.org/rss/news.rss" name="ISWC2007 + ASWC2007" description="The 6th International Semantic Web Conference and the 2nd Asian Semantic Web Conference, 2007" type="rss"> <hasTag tag="news"/> <hasTag tag="semantic web"/> <hasTag tag="iswc"/> </resource> <resource rank="2" uri="http://groupme.org/GroupMe/resource/112" weburl="http://iswc2007.semanticweb.org/img/ISWC_Top.jpg" name="ISWC/ASWC 07 Logo" description="Logo of the ISWC/ASWC 07" type="image"> <hasTag tag="iswc"/> <hasTag tag="2007"/> <hasTag tag="aswc"/> </resource> <resource rank="3" uri="http://groupme.org/GroupMe/group/104" name="ISWC 2007" description="Infos about the International Semantic Web Conference 2007 in Korea" type="group"> <hasTag tag="iswc"/> <hasTag tag="web"/> <hasTag tag="semantic web"/> <hasTag tag="aswc"/> <hasTag tag="eslab"/> <hasTag tag="2007"/> <hasResource uri="http://groupme.org/GroupMe/resource/105" weburl="http://iswc2007.semanticweb.org/img/photo/Barney_Pell.jpg" name="Barney Pell" type="image"/> <hasResource uri="http://groupme.org/GroupMe/resource/106" weburl="http://iswc2007.semanticweb.org/img/photo/chris_welty.jpg" name="Chris Welty" type="image"/> <hasResource uri="http://groupme.org/GroupMe/resource/107" weburl="http://iswc2007.semanticweb.org/" name="iswc 2007" type="website"/> <hasResource uri="http://groupme.org/GroupMe/resource/108" weburl="http://static.flickr.com/90/243820601_ae4014f569.jpg" name="Gwangalli Beach" type="image"/> <hasResource uri="http://groupme.org/GroupMe/resource/110" weburl="http://static.flickr.com/137/406287530_b0f1340fb1.jpg" name="busy Busan" type="image"/> <hasResource uri="http://groupme.org/GroupMe/resource/111" weburl="http://iswc2007.semanticweb.org/rss/news.rss" name="ISWC2007 + ASWC2007" type="rss"/> </resource> </result> - http://groupme.org/GroupMe/api.do?method=groupme.search&tag=web&tag=iswc - Click on the link to see the result :)
Export API
There are currently two export formats available: RDF and RSS. You can choose in which format the data should be exported by using
the export-format parameter.
Further options are listed below:
Arguments
-
tag
The tag parameter specifies the keyword the searched resource (or group) is tagged with.
Multiple tags are possible, for example:
...export.do?tag=hannover&tag=rathausBy searching for a keyword, the parameter mode is required!
-
export-format (optional)
Currently there are two export formats available. If no format is submitted, the data will be exported in RDF.- RDF (GroupMe! ontology)
- RSS (RSS 2.0 specification)
- mode
This parameter declares what should be exported. Exporting groups implies the export of resources in the respective group. However exporting resources only means the export of the keyword(s) tagged resources.- export-groups
- export-resources
Example answers
The answer shown below in RSS:
<channel>
<title>search-result</title>
<description />
<dc:language>en</dc:language>
<pubDate>Tue, 10 Jul 2007 23:20:23 CEST</pubDate>
<item>
<title>Hannover</title>
<description>Sightseeing stuff in Hannover</description>
<category>Hannover</category>
<category>rathaus</category>
<category>gärten</category>
</item>
<item>
<title>Hannover</title>
<description>Hannover ist eine wunderschöne Stadt.</description>
<category>Hannover</category>
</item>
</channel>
|
The answer shown below in RDF (truncated):
<rdf:Description rdf:about="http://www.groupme.net/Resource#1173">
<groupme:hasTag rdf:resource="http://www.groupme.net/Tag#6"/>
<groupme:hasResource rdf:resource="http://www.groupme.net/Resource#1175"/>
<groupme:hasResource rdf:resource="http://www.groupme.net/Resource#1174"/>
<groupme:resourceURL rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
</groupme:resourceURL>
<dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
Hannover ist eine wunderschöne Stadt.
</dc:description>
<dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
Hannover
</dc:title>
<rdf:type rdf:resource="http://groupme.net/rdf/#Group"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.groupme.net/Tag#6">
<groupme:isCorrelatedTo rdf:nodeID="A2"/>
<groupme:isCorrelatedTo rdf:nodeID="A1"/>
<groupme:isCorrelatedTo rdf:nodeID="A0"/>
<dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"/>
<groupme:keyword rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
Hannover
</groupme:keyword>
<rdf:type rdf:resource="http://groupme.net/rdf/#Tag"/>
</rdf:Description>
...
|
The client api is an easy way to use the possibilities of GroupMe! in your application. The example below show you
how to get started. The Javadoc api can be found here.
To download the client api Jar file please click here.
Client example
The following example will show you how easy it is to use the GroupMe! api. Just create a collection of keywords the group (or resource) should be tagged with (line 1 - 3). You only have to call the corresponding method with these keywords (line 4) and receive a collection of groups (or resources).
// imports
import org.groupme.action.GroupMeFactory;
import org.groupme.model.Group;
import org.groupme.model.Resource;
...
// create a list of keywords the group(s) is (are) tagged with
(1) Collection<String> keywords = new ArrayList<String>();
(2) keywords.add("semantic web");
(3) keywords.add("Web 2.0");
// get groups by these keywords
(4) Collection<Group> groupCollection = GroupMeFactory.getGroupsByTags(keywords);
// get the name and resources of the first group
(5) Group firstGroup = groupCollection.iterator.next();
(6) String groupName = firstGroup.getName();
(7) Collection<Resource> resourceCollection = firstGroup.getGroups();
|