MindPeeker provides official SDKs for popular programming languages and frameworks. These libraries handle authentication, request signing, error handling, and provide convenient interfaces for all API endpoints.
| Language | Package Manager | Version | Status |
|---|---|---|---|
| Python | pip | 2.1.0 | ✅ Stable |
| JavaScript/TypeScript | npm | 1.8.0 | ✅ Stable |
| Java | Maven | 1.5.0 | ✅ Stable |
| C# | NuGet | 1.3.0 | ✅ Stable |
| Go | Go modules | 1.2.0 | ✅ Stable |
| Ruby | RubyGems | 1.1.0 | ✅ Stable |
| PHP | Composer | 1.0.0 | ✅ Stable |
pip install mindpeeker-python
import mindpeeker
from mindpeeker.exceptions import MindPeekerError
client = mindpeeker.Client(api_key="your_api_key_here")
session = client.sessions.create(
type="remote_viewing",
target="Missing person investigation",
modality="visual",
duration_minutes=30
)
print(f"Session created: {session.session_id}")
results = client.sessions.get_results(session.session_id)
print(f"Confidence score: {results.confidence_score}")
dowsing_result = client.dowsing.query(
query_type="location",
question="Find the optimal location for water well",
context={
"location": {
"latitude": 40.7128,
"longitude": -74.0060,
"radius_meters": 1000
}
},
precision_level="high"
)
analysis = client.analysis.submit_target(
target_type="location",
reference_material={
"photos": ["https://example.com/photo1.jpg"],
"coordinates": {"latitude": 40.7128, "longitude": -74.0060}
},
analysis_type="comprehensive"
)
@app.route('/webhook', methods=['POST'])
def webhook():
event = client.webhooks.construct_event(request.data, request.headers['X-MindPeeker-Signature'])
if event.type == 'session.completed':
session = event.data
print(f"Session {session.session_id} completed")
return '', 200
import asyncio
import mindpeeker.async_client
async def main():
client = mindpeeker.async_client.AsyncClient(api_key="your_api_key")
session = await client.sessions.create(
type="remote_viewing",
target="Async test session"
)
results = await client.sessions.get_results(session.session_id)
print(results)
asyncio.run(main())
npm install @mindpeeker/javascript
yarn add @mindpeeker/javascript
import { MindPeekerClient } from '@mindpeeker/javascript';
// Initialize client
const client = new MindPeekerClient({
apiKey: 'your_api_key_here'
});
// Create session
const session = await client.sessions.create({
type: 'remote_viewing',
target: 'Investigation target',
modality: 'visual',
durationMinutes: 30
});
console.log('Session created:', session.sessionId);
// Get results
const results = await client.sessions.getResults(session.sessionId);
console.log('Confidence:', results.confidenceScore);
import React, { useState, useEffect } from 'react';
import { MindPeekerClient } from '@mindpeeker/javascript';
const client = new MindPeekerClient({
apiKey: process.env.REACT_APP_MINDPEEKER_API_KEY
});
function PsychicAnalysis({ target }) {
const [session, setSession] = useState(null);
const [results, setResults] = useState(null);
const [loading, setLoading] = useState(false);
const startAnalysis = async () => {
setLoading(true);
try {
const newSession = await client.sessions.create({
type: 'remote_viewing',
target,
modality: 'visual'
});
setSession(newSession);
// Poll for results
const pollResults = async () => {
const sessionResults = await client.sessions.getResults(newSession.sessionId);
if (sessionResults.status === 'completed') {
setResults(sessionResults);
setLoading(false);
} else {
setTimeout(pollResults, 5000);
}
};
pollResults();
} catch (error) {
console.error('Error:', error);
setLoading(false);
}
};
return (
<div>
<button onClick={startAnalysis} disabled={loading}>
{loading ? 'Analyzing...' : 'Start Analysis'}
</button>
{results && (
<div>
<h3>Results</h3>
<p>Confidence: {results.confidenceScore}</p>
<p>Location: {results.results.coordinates?.latitude}, {results.results.coordinates?.longitude}</p>
</div>
)}
</div>
);
}
const express = require('express');
const { MindPeekerClient } = require('@mindpeeker/javascript');
const app = express();
const client = new MindPeekerClient({
apiKey: process.env.MINDPEEKER_API_KEY
});
app.post('/api/analyze', async (req, res) => {
try {
const { target, type } = req.body;
const session = await client.sessions.create({
type: type || 'remote_viewing',
target,
modality: 'visual'
});
// Wait for completion
const results = await client.sessions.waitForCompletion(session.sessionId);
res.json({
sessionId: session.sessionId,
results: results
});
} catch (error) {
res.status(500).json({ error: error.message });
}
});
app.listen(3000, () => {
console.log('Server running on port 3000');
});
<dependency>
<groupId>com.mindpeeker</groupId>
<artifactId>mindpeeker-java</artifactId>
<version>1.5.0</version>
</dependency>
import com.mindpeeker.client.MindPeekerClient;
import com.mindpeeker.model.Session;
import com.mindpeeker.model.SessionResults;
public class MindPeekerExample {
public static void main(String[] args) {
// Initialize client
MindPeekerClient client = new MindPeekerClient("your_api_key_here");
try {
// Create session
Session session = client.sessions().create(
Session.Type.REMOTE_VIEWING,
"Investigation target",
Session.Modality.VISUAL,
30
);
System.out.println("Session created: " + session.getSessionId());
// Get results
SessionResults results = client.sessions().getResults(session.getSessionId());
System.out.println("Confidence score: " + results.getConfidenceScore());
} catch (MindPeekerException e) {
System.err.println("Error: " + e.getMessage());
}
}
}
@RestController
@RequestMapping("/api/psychic")
public class PsychicController {
private final MindPeekerClient mindPeekerClient;
public PsychicController() {
this.mindPeekerClient = new MindPeekerClient(
System.getenv("MINDPEEKER_API_KEY")
);
}
@PostMapping("/analyze")
public ResponseEntity<AnalysisResponse> analyze(@RequestBody AnalysisRequest request) {
try {
Session session = mindPeekerClient.sessions().create(
Session.Type.valueOf(request.getType().toUpperCase()),
request.getTarget(),
Session.Modality.valueOf(request.getModality().toUpperCase()),
request.getDurationMinutes()
);
SessionResults results = mindPeekerClient.sessions()
.waitForCompletion(session.getSessionId());
return ResponseEntity.ok(new AnalysisResponse(session, results));
} catch (MindPeekerException e) {
return ResponseEntity.status(500)
.body(new AnalysisResponse(e.getMessage()));
}
}
}
dotnet add package MindPeeker.CSharp
using MindPeeker;
using MindPeeker.Models;
class Program
{
static async Task Main(string[] args)
{
// Initialize client
var client = new MindPeekerClient("your_api_key_here");
try
{
// Create session
var session = await client.Sessions.CreateAsync(new SessionRequest
{
Type = SessionType.RemoteViewing,
Target = "Investigation target",
Modality = SessionModality.Visual,
DurationMinutes = 30
});
Console.WriteLine($"Session created: {session.SessionId}");
// Get results
var results = await client.Sessions.GetResultsAsync(session.SessionId);
Console.WriteLine($"Confidence score: {results.ConfidenceScore}");
}
catch (MindPeekerException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
[ApiController]
[Route("api/[controller]")]
public class PsychicController : ControllerBase
{
private readonly MindPeekerClient _mindPeekerClient;
public PsychicController(IConfiguration configuration)
{
_mindPeekerClient = new MindPeekerClient(
configuration["MindPeeker:ApiKey"]
);
}
[HttpPost("analyze")]
public async Task<IActionResult> Analyze([FromBody] AnalysisRequest request)
{
try
{
var session = await _mindPeekerClient.Sessions.CreateAsync(new SessionRequest
{
Type = Enum.Parse<SessionType>(request.Type),
Target = request.Target,
Modality = Enum.Parse<SessionModality>(request.Modality),
DurationMinutes = request.DurationMinutes
});
var results = await _mindPeekerClient.Sessions
.WaitForCompletionAsync(session.SessionId);
return Ok(new { SessionId = session.SessionId, Results = results });
}
catch (MindPeekerException ex)
{
return StatusCode(500, new { Error = ex.Message });
}
}
}
go get github.com/mindpeeker/go-sdk
package main
import (
"fmt"
"github.com/mindpeeker/go-sdk"
"github.com/mindpeeker/go-sdk/models"
)
func main() {
// Initialize client
client := mindpeeker.NewClient("your_api_key_here")
// Create session
session, err := client.Sessions.Create(&models.SessionRequest{
Type: models.SessionTypeRemoteViewing,
Target: "Investigation target",
Modality: models.SessionModalityVisual,
DurationMinutes: 30,
})
if err != nil {
fmt.Printf("Error creating session: %v\n", err)
return
}
fmt.Printf("Session created: %s\n", session.SessionID)
// Get results
results, err := client.Sessions.GetResults(session.SessionID)
if err != nil {
fmt.Printf("Error getting results: %v\n", err)
return
}
fmt.Printf("Confidence score: %.2f\n", results.ConfidenceScore)
}
All SDKs support configuration via environment variables:
MINDPEEKER_API_KEY=your_api_key_here
MINDPEEKER_API_URL=https://api.mindpeeker.com/v1
MINDPEEKER_TIMEOUT=30000
MINDPEEKER_RETRY_ATTEMPTS=3
MINDPEEKER_CONFIG = {
'api_key': 'your_api_key_here',
'api_url': 'https://api.mindpeeker.com/v1',
'timeout': 30,
'retry_attempts': 3,
'webhook_secret': 'your_webhook_secret'
}
All SDKs provide structured error handling:
try:
session = client.sessions.create(...)
except MindPeekerAuthenticationError:
print("Invalid API key")
except MindPeekerRateLimitError:
print("Rate limit exceeded")
except MindPeekerValidationError as e:
print(f"Validation error: {e.details}")
except MindPeekerError as e:
print(f"API error: {e.message}")
from unittest.mock import patch
from mindpeeker.testing import MockClient
mock_client = MockClient()
mock_client.sessions.create.return_value = MockSession(session_id="test_123")
session = mock_client.sessions.create(...)
assert session.session_id == "test_123"
Use sandbox API keys for testing:
client = mindpeeker.Client(
api_key="sb_test_your_test_key_here",
api_url="https://sandbox-api.mindpeeker.com/v1"
)