Skip to content

Commit

Permalink
Some fixes to READMEs and updating imports.
Browse files Browse the repository at this point in the history
Change-Id: I754aaa4e962f1ebfe2f4dbcdc83767b8f3ea6f03
  • Loading branch information
Nicolas Garnier committed Oct 12, 2016
1 parent e60efc3 commit dc99790
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 34 deletions.
4 changes: 2 additions & 2 deletions bigquery-import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This template shows how to copy data from the Realtime Database (such as logs be

## Function Code

See file [index.js](functions/index.js) for the code.
See file [functions/index.js](functions/index.js) for the code.

The dependencies are listed in [functions/package.json](package.json).
The dependencies are listed in [functions/package.json](functions/package.json).

## Sample Database Structure

Expand Down
5 changes: 1 addition & 4 deletions bigquery-import/functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ const functions = require('firebase-functions');
const Q = require('q');

// gcloud config.
const gcloudconfig = {
projectId: process.env.GCLOUD_PROJECT
};
const gcloud = require('gcloud')(gcloudconfig);
const gcloud = require('google-cloud')();
const bigquery = gcloud.bigquery();

/**
Expand Down
2 changes: 1 addition & 1 deletion bigquery-import/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dependencies": {
"firebase": "^3.4.1",
"firebase-functions": "https://storage.googleapis.com/firebase-preview-drop/node/firebase-functions/firebase-functions-preview.latest.tar.gz",
"gcloud": "^0.27.0",
"google-cloud": "^0.41.2",
"q": "^1.4.1"
}
}
4 changes: 2 additions & 2 deletions child-count/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This template shows how to keep track of the number of elements in a Firebase Da

## Functions Code

See file [index.js](functions/index.js) for the code.
See file [functions/index.js](functions/index.js) for the code.

This is done by simply updating a `likes_count` attribute on the parent of the list node which is tracked.

The dependencies are listed in [package.json](package.json).
The dependencies are listed in [functions/package.json](functions/package.json).

## Sample Database Structure

Expand Down
8 changes: 4 additions & 4 deletions email-confirmation/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Send Confirmation Emails with Firebase Cloud Functions
# Send Confirmation Emails with Firebase Functions

This template shows how to send a confirmation emails to users who are subscribing/un-subscribing to a newsletter.
This sample shows how to send a confirmation emails to users who are subscribing/un-subscribing to a newsletter.


## Functions Code

See file [index.js](index.js) for the email sending code.
See file [functions/index.js](functions/index.js) for the email sending code.

Sending emails is performed using [nodemailer](https://www.npmjs.com/package/bad-words) a node based Email client with comprehensive EMail server setup. In this sample we're showing how to send email through SMTP using a Gmail account. Be aware that Gmail has an [email sending quota](). If you are planning on sending a large number of emails you should use a professional email sending platform such as Sendgrid

The dependencies are listed in [package.json](package.json).
The dependencies are listed in [functions/package.json](functions/package.json).


## Sample Database Structure
Expand Down
4 changes: 2 additions & 2 deletions fulltext-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This template shows how to enable full text search on firebase database elements

## Functions Code

See file [index.js](functions/index.js) for the code.
See file [functions/index.js](functions/index.js) for the code.

The dependencies are listed in [package.json](functions/package.json).
The dependencies are listed in [functions/package.json](functions/package.json).

## Sample Database Structure

Expand Down
9 changes: 0 additions & 9 deletions fulltext-search/env.json

This file was deleted.

4 changes: 2 additions & 2 deletions lastmodified-tracking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This template shows how to keep track of the date at which the Firebase Database

## Functions Code

See file [index.js](functions/index.js) for the code.
See file [functions/index.js](functions/index.js) for the code.

This is done by simply updating a `lastmodified` attribute on the parent of the node which is tracked (for instance at the root of the Database).

The dependencies are listed in [package.json](functions/package.json).
The dependencies are listed in [functions/package.json](functions/package.json).

## Sample Database Structure

Expand Down
4 changes: 2 additions & 2 deletions limit-children/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This template shows how to keep the number of child nodes in a Firebase database

## Functions Code

See file [index.js](function/index.js) for the code.
See file [functions/index.js](function/index.js) for the code.

The dependencies are listed in [package.json](function/package.json).
The dependencies are listed in [functions/package.json](function/package.json).

## Sample Database Structure

Expand Down
4 changes: 2 additions & 2 deletions message-translation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This template shows how to translate a new message in a given language into mult

## Functions Code

See file [index.js](functions/index.js) for the code.
See file [functions/index.js](functions/index.js) for the code.

This is done by using the Google Translate API to translate the new message. The translated output is written into a fanned out structure using the langauge code as the key.

The dependencies are listed in [package.json](functions/package.json).
The dependencies are listed in [functions/package.json](functions/package.json).

## Sample Database Structure

Expand Down
2 changes: 1 addition & 1 deletion minimal-webhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This Function shows how a Database write can trigger a request to a hardcoded ca

## Functions Code

See file [index.js](functions/index.js) for the code.
See file [functions/index.js](functions/index.js) for the code.

We're sending a request to an external webhook. As a sample we're using a Request Bin from [requestb.in](http://requestb.in) that will receive the Data so you can visualize it easily. make sure you create your own Request Bin and update the sample with it.

Expand Down
6 changes: 3 additions & 3 deletions text-moderation/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Text Moderation with Firebase Cloud Functions
# Text Moderation with Firebase Functions

This template shows how to perform server side moderation of text written to a Firebase DB.

Expand All @@ -7,11 +7,11 @@ For instance if a user added the message "I DON'T LIKE THIS APP!! This is POOP!!

## Functions Code

See file [index.js](index.js) for the moderation code.
See file [functions/index.js](functions/index.js) for the moderation code.

Moderation of the messages is performed using [bad-words](https://www.npmjs.com/package/bad-words) a bad words remover that uses an external [list of bad-words](https://github.com/web-mech/badwords-list) and is currently mostly aimed at filtering english bad words. Also messages that contains mostly upper case characters are re-capitalized correctly using [capitalize-sentence](https://www.npmjs.com/package/capitalize-sentence).

The dependencies are listed in [package.json](package.json).
The dependencies are listed in [functions/package.json](functions/package.json).


## Sample Database Structure
Expand Down

0 comments on commit dc99790

Please sign in to comment.