You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial commit.
Spec.php, composer.json, types.php, LICENSE added
README.md: Added composer package instructions
.gitignore: Added standard ignore statements for most composer packages
Build.php: Added writePHPObject() function to create the types.php file
package-lock.json: Did NOT bump version
* Requested changes to README.md
Copy file name to clipboardExpand all lines: README.md
+90Lines changed: 90 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,3 +276,93 @@ Some possible next steps for this format include:
276
276
- contact information for following up on issues with feed or meeting info
277
277
- language split out into its own fields
278
278
- indication of which language was used for geocoding
279
+
280
+
## Use the Spec in your code
281
+
282
+
### PHP
283
+
***
284
+
### Code4Recovery Spec Composer Package
285
+
286
+
This package contains a class that makes the most up-to-date meeting types available to your application. Updates are released anytime new meeting types are added.
287
+
288
+
### Installation
289
+
```shell
290
+
composer require code4recovery/spec
291
+
```
292
+
293
+
### Get all available languages
294
+
Returns an array of all available languages for types can be translated into. The array is keyed by language code and has the expanded language name as the value.
295
+
```php
296
+
$spec::getLanguages();
297
+
```
298
+
Example returned value
299
+
```php
300
+
[
301
+
'en' => 'English',
302
+
'es' => 'Español',
303
+
'fr' => 'Français',
304
+
'ja' => '日本語',
305
+
'sv' => 'Svenska',
306
+
];
307
+
```
308
+
309
+
### Get all types
310
+
Returns an object containing all current meeeting types in every language.
311
+
```php
312
+
$spec::getAllTypes();
313
+
```
314
+
Example returned value (truncated)
315
+
```php
316
+
{
317
+
"11": {
318
+
"en": "11th Step Meditation",
319
+
"es": "Meditación del Paso 11",
320
+
"fr": "Méditation sur la 11e Étape",
321
+
"ja": "ステップ11 黙想",
322
+
"sv": "11th Stegs Meditation"
323
+
},
324
+
"12x12": {
325
+
"en": "12 Steps & 12 Traditions",
326
+
"es": "12 Pasos y 12 Tradiciones",
327
+
"fr": "12 Étapes et 12 Traditions",
328
+
"ja": "12のステップと12の伝統",
329
+
"sv": "12 Steg & 12 Traditioner"
330
+
},
331
+
...
332
+
};
333
+
```
334
+
335
+
### Get types by language
336
+
Returns an array of types translated into a specified language. Pass the desired language key as a string ('en', 'es', 'fr', etc.)
337
+
338
+
```php
339
+
$spec::getTypesByLanguage('en');
340
+
```
341
+
Example returned value
342
+
```php
343
+
[
344
+
11 => "11th Step Meditation"
345
+
"12x12" => "12 Steps & 12 Traditions"
346
+
"A" => "Secular"
347
+
"ABSI" => "As Bill Sees It"
348
+
...
349
+
];
350
+
```
351
+
352
+
### Typescript/Javascript
353
+
***
354
+
355
+
### Installation
356
+
```shell
357
+
npm i @code4recovery/spec
358
+
```
359
+
360
+
### Usage
361
+
```shell
362
+
import { getTypesForLanguage } from '@code4recovery/spec';
363
+
364
+
const types = getTypesForLanguage('en');
365
+
```
366
+
367
+
## License
368
+
Code4Recovery Spec is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
"description": "The goal of the Meeting Guide API is help sync information about AA meetings. It was developed for the Meeting Guide app, but it is non-proprietary and other systems are encouraged to make use of it.",
0 commit comments