REST::Cypher::Agent - Experimental client for using neo4j's REST/Cypher interface
version 0.0.4
Interact with a neo4j Cypher API.
This is the full URL value of the neo4j server to connect to.
base_url => http://my.neo4j.example.com:7474
It is a required attribute, with no default value.
This is the URL used to connect to the Cypher endpoint(s).
It is a derived value, based on base_url
base_url
This attribute provides the value for the User Agent string when making API calls.
This attribute has a default value of REST::Cypher::Agent/0.0.0, but may be overridden.
REST::Cypher::Agent/0.0.0
This attribute holds the agent object, used for making the HTTP calls to the API endpoint.
The default value is an instance of LWP::UserAgent. You may override this. At your own risk.
neo4j allows authentication to be enabled for connections to the database. For recent versions this is enabled by default.
The auth-token value is 'a base64 encoded string of "username:password"'
The default value is set to the equivalent of encode_base64('neo4j:neo4j').
encode_base64('neo4j:neo4j')
This attribute stores the response object from the most recent call to the API. See HTTP::Response for a description of the interface it provides.
This boolean attribute enables debugging output for the class.
This method provides low-level access to LWP::UserAgent-get()>.
LWP::UserAgent-
It takes care of constructing the URL, using the provided query parameters.
The method returns the response object, after storing it in last_response.
last_response
# (just) GET the base URL $response = $cypher_agent->GET({query_string => '' });
You can generate your own auth_token value using MIME::Base64
auth_token
perl -MMIME::Base64 -e "warn encode_base64('neo4j:neo4j');"
neo4j
REST::Neo4p
Chisel <chisel@chizography.net>
This software is copyright (c) 2015 by Chisel Wright.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install REST::Cypher, copy and paste the appropriate command in to your terminal.
cpanm
cpanm REST::Cypher
CPAN shell
perl -MCPAN -e shell install REST::Cypher
For more information on module installation, please visit the detailed CPAN module installation guide.