This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onRequest } from 'firebase-functions/v2/https'; | |
import { google } from 'googleapis'; | |
import admin from 'firebase-admin'; | |
import { setGlobalOptions } from 'firebase-functions/v2'; | |
setGlobalOptions({ | |
maxInstances: 1 | |
}); | |
admin.initializeApp(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
name: 🚀 Deploy website on push | |
jobs: | |
web-deploy: | |
name: 🎉 Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onSchedule } from 'firebase-functions/v2/scheduler'; | |
import { logger } from 'firebase-functions'; | |
const sendEmailDummy = async (user) => { | |
logger.info(`Sending email to ${user.email}...`); | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
logger.info(`Email sent to ${user.email}!`); | |
resolve(); | |
}, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import defaultRequest from './defaultRequest.js'; | |
import reminderCron from './reminderCron.js'; | |
export { | |
defaultRequest, | |
reminderCron, | |
// and other functions.. | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import admin from 'firebase-admin'; | |
import { setGlobalOptions } from 'firebase-functions/v2'; | |
setGlobalOptions({ | |
maxInstances: 1 | |
}); | |
admin.initializeApp(); | |
const db = admin.firestore(); | |
const messaging = admin.messaging(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$searchResults = $searchEngine->search( | |
[ | |
'index' => 'search-linkedin-post', // index name | |
'_source' => 'public_linkedin_posts_new_text, public_linkedin_posts_new_poster_linkedin_url, public_linkedin_posts_new_reshared', // fields to return | |
'body' => [ | |
'query' => [ | |
'bool' => [ | |
'should' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$searchResults = $searchEngine->search( | |
[ | |
'index' => 'search-linkedin-post', // index name | |
'_source' => 'public_linkedin_posts_new_text, public_linkedin_posts_new_poster_linkedin_url, public_linkedin_posts_new_reshared', // fields to return | |
'body' => [ | |
'query' => [ | |
'bool' => [ | |
'filter' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$searchResults = $searchEngine->search( | |
[ | |
'index' => 'search-linkedin-post', // index name | |
'_source' => 'public_linkedin_posts_new_text, public_linkedin_posts_new_poster_linkedin_url', // fields to return | |
'body' => [ | |
'query' => [ | |
'bool' => [ | |
'should' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$searchResults = $searchEngine->search( | |
[ | |
'index' => 'search-linkedin-post', // index name | |
'_source' => 'public_linkedin_posts_new_text, public_linkedin_posts_new_poster_linkedin_url', // fields to return | |
'body' => [ | |
'query' => [ | |
'bool' => [ | |
'must' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__); | |
$dotenv->load(); | |
use Atakan\ElasticEx\MySearchEngine; | |
$searchEngine = new MySearchEngine(); | |
$searchResults = $searchEngine->search( |