<commit_before># About firebase

Package firebase provides a Firebase v3.0.0+ compatible API.

## Installation

Install in the usual way:

```sh
go get -u github.com/knq/firebase
```

## Usage

Please see [the GoDoc API page](http://godoc.org/github.com/knq/firebase) for a
full API listing.

Below is a short example showing basic usage. Additionally, a [more complete
example](example/full/full.go) is available.

```go
package main

import (
	"flag"
	"log"
	"time"

	"golang.org/x/net/context"

	"github.com/knq/firebase"
)

type Person struct {
	Name      string                   `json:"name"`
	Birthdate time.Time                `json:"birth_date"`
	Created   firebase.ServerTimestamp `json:"created"`
}

var (
	flagCredentialsFile = flag.String("c", "test-1470ffbcc1d8.json", "credentials file")
)

func main() {
	var err error

	flag.Parse()

	// create initial firebase database ref using Google service account
	// credentials as downloaded from the Google cloud console<commit_msg>Updating README.md<commit_after># About firebase

Package firebase provides a Firebase v3+ compatible API.

## Installation

Install in the usual way:

```sh
go get -u github.com/knq/firebase
```

## Usage

Please see [the GoDoc API page](http://godoc.org/github.com/knq/firebase) for a
full API listing.

Below is a short example showing basic usage. Additionally, a [more complete
example](examples/full/full.go) is available.

```go
package main

import (
	"flag"
	"log"
	"time"

	"golang.org/x/net/context"

	"github.com/knq/firebase"
)

type Person struct {
	Name      string                   `json:"name"`
	Birthdate time.Time                `json:"birth_date"`
	Created   firebase.ServerTimestamp `json:"created"`
}

var (
	flagCredentialsFile = flag.String("c", "test-1470ffbcc1d8.json", "credentials file")
)

func main() {
	var err error

	flag.Parse()

	// create initial firebase database ref using Google service account
	// credentials as downloaded from the Google cloud console
{'fraction_non_alphanumeric': 0.11329305135951662, 'fraction_numerical': 0.008056394763343404, 'mean_word_length': 3.567816091954023, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3450276', 'n_tokens_mistral': 669, 'n_tokens_neox': 633, 'n_words': 198}