Skip to content

Commit

Permalink
Merge pull request #1216 from OneSignal/user-language-functions-api-spec
Browse files Browse the repository at this point in the history
feat: add User language functions to API spec
  • Loading branch information
sherwinski authored Jan 14, 2025
2 parents 0e299a6 + d49319d commit 30c4265
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
3 changes: 1 addition & 2 deletions __test__/unit/user/user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ describe('User tests', () => {
expect(tags).toBe(tagsSample);
});


test('getLanguage should return the correct user language', async () => {
await TestEnvironment.initialize();

const languageSample = 'fr'
const languageSample = 'fr';

const propertyModel = getDummyPropertyOSModel();
propertyModel.set('language', languageSample);
Expand Down
18 changes: 18 additions & 0 deletions api.json
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,24 @@
}
],
"returnType": "void"
},
{
"name": "setLanguage",
"isAsync": false,
"args": [
{
"name": "language",
"type": "string",
"optional": false
}
],
"returnType": "void"
},
{
"name": "getLanguage",
"isAsync": false,
"args": [],
"returnType": "string"
}
],
"properties": [
Expand Down

0 comments on commit 30c4265

Please sign in to comment.