Skip to content

Instantly share code, notes, and snippets.

@VB10
Created November 13, 2024 22:35
Show Gist options
  • Save VB10/c8f7f15805f0f1e4e60ee3486105800e to your computer and use it in GitHub Desktop.
Save VB10/c8f7f15805f0f1e4e60ee3486105800e to your computer and use it in GitHub Desktop.
Firebase emulator ready to use cUrl
curl --request POST \
--url 'http://localhost:3002/v1/projects/PROJECT_NAME/databases/(default)/documents/COLLECTION_NAME' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"address": {
"stringValue": "Örnek Mahallesi Test Sokak Numara 123"
},
"createdAt": {
"timestampValue": "2023-08-15T10:30:25Z"
},
"description": {
"stringValue": "Örnek Mahallesinde bulunan test Aşevi"
},
"deviceID": {
"stringValue": ""
},
"images": {
"arrayValue": {
"values": [
{
"stringValue": "https://picsum.photos/400"
}
]
}
},
"isApproved": {
"booleanValue": true
},
"name": {
"stringValue": "Test Aşevi"
},
"owner": {
"stringValue": "T.T.T."
},
"phone": {
"stringValue": "0(555) 123-45-67"
},
"townCode": {
"integerValue": 5
},
"updatedAt": {
"timestampValue": "2023-08-16T11:45:30Z"
}
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment