open-index/open-npm huggingface dataset:
npm package: @kastorcode/expo-startio
Description: Expo/React Native module for integration with Start.io Ads SDK
Latest version: 1.0.1

# @kastorcode/expo-startio

A React Native module that provides integration with Start.io Ads SDK for Expo/React Native applications. This package allows you to easily implement various ad formats in your mobile application.

## Features

- Android only
- Native integration with Start.io Ads SDK
- Support for multiple ad formats:
  - Banner ads
  - Cover ads
  - Mrec ads
- User consent management
- Ad frequency control
- TypeScript support

## Requirements

- Expo/React Native
- TypeScript (optional)
- Start.io account and app ID

## Installation

```bash
npm install @kastorcode/expo-startio
# or
yarn add @kastorcode/expo-startio
```

## Usage

```typescript
import {
  initStartio, setUserConsentStartio, setSecondsBetweenAdsStartio, setActivitiesBetweenAdsStartio, showAdStartio
} from '@kastorcode/expo-startio'

// Initialize with your Start.io app ID
await initStartio('YOUR_APP_ID', false) // Set second parameter to true for test mode

// Set user consent
await setUserConsentStartio('pas') // 'pas' for personalized ads

// Set minimum seconds between ads
await setSecondsBetweenAdsStartio(60) // 60 seconds

// Set minimum activities between ads
await setActivitiesBetweenAdsStartio(3) // 3 activities

// Show an ad in full screen
await showAdStartio()
```
### Components
```typescript
import {
  StartioBanner, StartioCover, StartioMrec
} from '@kastorcode/expo-startio'

// 320x50 banner ad
<StartioBanner />

// 320x156 banner ad
<StartioCover />

// 320x250 banner ad
<StartioMrec />
```

## API Reference

### Functions

- `initStartio(appId: string, isTest: boolean): Promise<boolean>`
  - Initializes the Start.io SDK
  - Parameters:
    - `appId`: Your Start.io app ID
    - `isTest`: Set to true for test mode

- `setUserConsentStartio(consent: 'pas' | string): Promise<boolean>`
  - Sets user consent for ad tracking
  - Parameters:
    - `consent`: User consent type ('pas' for Personalized Ads)

- `setSecondsBetweenAdsStartio(seconds: number): Promise<boolean>`
  - Sets minimum seconds between ads
  - Parameters:
    - `seconds`: Minimum seconds between ads

- `setActivitiesBetweenAdsStartio(activities: number): Promise<boolean>`
  - Sets minimum activities between ads
  - Parameters:
    - `activities`: Minimum activities between ads

- `showAdStartio(): Promise<boolean>`
  - Shows an ad in full screen

### Components

- `StartioBanner`
  - Banner ad component
  - Default size: 320x50

- `StartioCover`
  - Cover ad component
  - Default size: 320x156

- `StartioMrec`
  - Mrec ad component
  - Default size: 320x250

---

<p align="center">
  <big><b>&lt;kastor.code/&gt;</b></big>
</p>