Skip to content

Instantly share code, notes, and snippets.

View SametSahin10's full-sized avatar
🏠
Working from home

SametSahin10

🏠
Working from home
View GitHub Profile
Future<Map<String, dynamic>> _analyzeWithGPT(String text) async {
final response = await http.post(
Uri.parse('https://api.openai.com/v1/chat/completions'),
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer $apiKey',
},
body: jsonEncode({
'model': 'gpt-4o-mini',
'messages': [
import axios from 'axios';
/**
* Sends an FCM message using the HTTP v1 API
* @param serviceAccountPath Path to your service account JSON file
* @param projectId Your Firebase project ID
* @param token The FCM registration token of the target device
* @param title The notification title
* @param body The notification body
* @param data Optional data payload
<?php
/**
* Gets an access token for FCM API calls
* @param string $serviceAccountPath Path to your service account JSON file
* @return string The access token
*/
function getAccessToken($serviceAccountPath) {
$serviceAccount = json_decode(file_get_contents($serviceAccountPath), true);
import 'dart:io';
import 'package:fuse_wallet_sdk/fuse_wallet_sdk.dart';
void main() async {
// TODO: Add your private key
final credentials = EthPrivateKey.fromHex('');
final prodApiKey = 'pk_F7gisUhUTV5LyiNcftikb0UL';
final fuseSDK = await FuseSDK.init(