mirror of https://github.com/zulip/zulip.git
api docs: Stop mentioning "dev servers" in JS code examples.
Since the Zulip API runs on both developement and production servers, it is misleading to mention "dev servers" when discussing zuliprc files. Also, note that it is better to manually edit all of our JS examples than to implement macro-like functionality that we use for our Python examples. For our current purposes, it would be too much work to build a full-blown testing framework for our JS code examples just so that we can fix a minor wording issue. Fixes #10672.
This commit is contained in:
parent
c9cc3ae451
commit
9c589ac7d9
|
@ -22,9 +22,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -19,7 +19,7 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// You need a zuliprc-admin with administrator credentials
|
// The user for this zuliprc file must be an organization administrator.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-admin',
|
zuliprc: 'zuliprc-admin',
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,9 +18,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -16,8 +16,8 @@ This endpoint allows you to receive new events from
|
||||||
import sys
|
import sys
|
||||||
import zulip
|
import zulip
|
||||||
|
|
||||||
# Download ~/zuliprc-dev from your dev server
|
# Pass the path to your zuliprc file here.
|
||||||
client = zulip.Client(config_file="~/zuliprc-dev")
|
client = zulip.Client(config_file="~/zuliprc")
|
||||||
|
|
||||||
# If you already have a queue registered and thus, have a queue_id
|
# If you already have a queue registered and thus, have a queue_id
|
||||||
# on hand, you may use client.get_events() and pass in the above
|
# on hand, you may use client.get_events() and pass in the above
|
||||||
|
@ -37,9 +37,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -42,9 +42,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server, assuming it's in the local dir
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -18,9 +18,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -36,8 +36,8 @@ instead use the raw [register](/api/register-queue) and
|
||||||
import sys
|
import sys
|
||||||
import zulip
|
import zulip
|
||||||
|
|
||||||
# Download ~/zuliprc-dev from your dev server
|
# Pass the path to your zuliprc file here.
|
||||||
client = zulip.Client(config_file="~/zuliprc-dev")
|
client = zulip.Client(config_file="~/zuliprc")
|
||||||
|
|
||||||
# Print every message the current user would receive
|
# Print every message the current user would receive
|
||||||
# This is a blocking call that will run forever
|
# This is a blocking call that will run forever
|
||||||
|
|
|
@ -58,9 +58,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
|
@ -17,9 +17,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send a stream message
|
// Send a stream message
|
||||||
|
|
|
@ -20,9 +20,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
const typingParams = {
|
const typingParams = {
|
||||||
|
|
|
@ -21,9 +21,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
const flagParams = {
|
const flagParams = {
|
||||||
|
|
|
@ -20,9 +20,9 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
|
||||||
```js
|
```js
|
||||||
const zulip = require('zulip-js');
|
const zulip = require('zulip-js');
|
||||||
|
|
||||||
// Download zuliprc-dev from your dev server
|
// Pass the path to your zuliprc file here.
|
||||||
const config = {
|
const config = {
|
||||||
zuliprc: 'zuliprc-dev',
|
zuliprc: 'zuliprc',
|
||||||
};
|
};
|
||||||
|
|
||||||
zulip(config).then((client) => {
|
zulip(config).then((client) => {
|
||||||
|
|
Loading…
Reference in New Issue