# Onairos Data Request Format - Developer Guide

## 📋 **Overview**

The Onairos data request format allows developers to specify what user insights they need. There are exactly **2 types of data** that Onairos provides, and developers choose which ones they want.

## 🔧 **Simple Format**

### **Basic Structure**
```dart
requestData: {
  'data_type': {
    'name': 'What you want',
    'description': 'Why you need it',
    'reward': 'What the user gets',
  },
}
```

### **2 Standardized Data Types**

#### **1. Personality Traits** 
*Unique characteristics and behavioral patterns of the user*
```dart
'personality_traits': {
  'name': 'Personality Traits',
  'description': 'Understanding your unique characteristics and behavioral patterns',
  'reward': 'Highly personalized recommendations',
}
```

#### **2. Sentiment Analysis**
*User interests and emotional responses to developer inputs*
```dart
'sentiment_analysis': {
  'name': 'Interest & Sentiment Analysis', 
  'description': 'Analysis of your interests and emotional responses to content',
  'reward': 'Content and responses tailored to your preferences',
}
```

## 💡 **Complete Examples**

### **Dating App**
```dart
Onairos(
  AppName: 'LoveMatch',
  requestData: {
    'personality_traits': {
      'name': 'Personality Traits',
      'description': 'Understanding your unique characteristics for better matches',
      'reward': 'Highly compatible match recommendations',
    },
    'sentiment_analysis': {
      'name': 'Interest & Sentiment Analysis',
      'description': 'Analysis of your interests and what you find attractive',
      'reward': 'Matches based on shared interests and emotional compatibility',
    },
  },
  onResolved: (apiUrl, token, userData) {
    // Handle the data
  },
)
```

### **Fitness App**
```dart
Onairos(
  AppName: 'FitGenius',
  requestData: {
    'personality_traits': {
      'name': 'Personality Traits',
      'description': 'Understanding your motivation style and goal-setting approach',
      'reward': 'Workout plans that match your personality',
    },
    'sentiment_analysis': {
      'name': 'Interest & Sentiment Analysis',
      'description': 'Analysis of your fitness interests and motivational triggers',
      'reward': 'Personalized content that keeps you motivated',
    },
  },
  onResolved: (apiUrl, token, userData) {
    // Handle the data
  },
)
```

### **Shopping App**
```dart
Onairos(
  AppName: 'StyleAI',
  requestData: {
    'personality_traits': {
      'name': 'Personality Traits',
      'description': 'Understanding your decision-making style and preferences',
      'reward': 'Shopping experience tailored to how you like to browse',
    },
    'sentiment_analysis': {
      'name': 'Interest & Sentiment Analysis',
      'description': 'Analysis of your style preferences and product interests',
      'reward': 'Products curated to match your taste and interests',
    },
  },
  onResolved: (apiUrl, token, userData) {
    // Handle the data
  },
)
```

## 🎯 **Writing Guidelines**

### **Data Types**: Only use these 2 standardized types
- ✅ `'personality_traits'` - Unique behavioral characteristics
- ✅ `'sentiment_analysis'` - Interests and emotional responses
- ❌ Any other keys - Not supported

### **Name**: Keep it short and clear
- ✅ "Personality Traits"
- ✅ "Interest & Sentiment Analysis" 
- ❌ "Advanced Psychological Profile Analysis"

### **Description**: Explain what you're analyzing for your specific app
- ✅ "Understanding your unique characteristics for better matches"
- ✅ "Analysis of your interests and what motivates you"
- ❌ "Machine learning analysis of behavioral patterns"

### **Reward**: What the user gets in your app
- ✅ "Highly compatible match recommendations"
- ✅ "Personalized workout plans that keep you engaged"
- ❌ "Enhanced algorithmic processing capabilities"

## 📱 **What Users See**

The data request screen automatically includes:
- ✅ **Basic Info** (email, account setup) - always included, no need to specify
- ✅ **Your data requests** - displayed as selectable cards with clear names
- ✅ **Clear privacy message** - "None of your app data is shared with ANYONE"

## ⚡ **Quick Start Template**

```dart
Onairos(
  AppName: 'YourAppName',
  requestData: {
    'personality_traits': {
      'name': 'Personality Traits',
      'description': 'Understanding your unique characteristics for [your app purpose]',
      'reward': 'Highly personalized [your app benefit]',
    },
    'sentiment_analysis': {
      'name': 'Interest & Sentiment Analysis',
      'description': 'Analysis of your interests and preferences for [your app purpose]',
      'reward': 'Content and features tailored to your interests',
    },
  },
  onResolved: (apiUrl, token, userData) {
    print('API URL: $apiUrl');
    print('Access Token: $token');
    print('User Data: $userData');
  },
)
```

## 🔄 **Migration from Old Format**

### **Old Format (Deprecated)**
```dart
requestData: {
  'Small': {
    'type': 'Personality',
    'descriptions': 'Load more data with Onairos for better dating matches',
    'reward': 'Enhanced compatibility analysis',
  },
}
```

### **New Format**
```dart
requestData: {
  'personality_traits': {
    'name': 'Personality Traits',
    'description': 'Understanding your characteristics for better matches',
    'reward': 'Enhanced compatibility analysis',
  },
}
```

---

**That's it!** Use only these 2 standardized data types that match what Onairos actually provides. 