Skip to content

Conversation

@Rackover
Copy link
Member

@Rackover Rackover commented Nov 27, 2018

Now uses java api instead of Python API

Added a config option to disable the java api since the java api is currently unable to handle achievements and events. This will allow us to update the python server early and to enable the feature later via an ENV variable.

@Rackover Rackover force-pushed the java_api_and_army_result_fix branch 12 times, most recently from 5046b5b to 15e3a16 Compare December 2, 2018 14:16
@Rackover Rackover changed the title Java api and army result fix Java api Dec 2, 2018
Copy link
Collaborator

@norraxx norraxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed

async def api_patch(self, path, json_data):
headers = {'Content-type': 'application/json'}
result = self._session.request("PATCH", API_BASE_URL + path, headers=headers, json=json_data)
return result.status_code, result.text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\n

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That mean put new line

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be new line, event github shows it to you ;-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I know \n means new line, my question is Where

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the end of file

@pytest.fixture()
def service(api_accessor: ApiAccessor):
return AchievementService(api_accessor)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\n

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is https://www.python.org/dev/peps/pep-0008/.
Please check it, there are some rules, how code should be formatted.

@Rackover Rackover force-pushed the java_api_and_army_result_fix branch 9 times, most recently from 68008fe to f0d395c Compare December 4, 2018 23:22
async def api_patch(self, path, json_data):
headers = {'Content-type': 'application/json'}
result = self._session.request("PATCH", API_BASE_URL + path, headers=headers, json=json_data)
return result.status_code, result.text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be new line, event github shows it to you ;-)

@Rackover Rackover force-pushed the java_api_and_army_result_fix branch 6 times, most recently from c1a480f to a1988bc Compare December 7, 2018 22:44
@Rackover Rackover force-pushed the java_api_and_army_result_fix branch 3 times, most recently from 9d796bc to 8fbd41c Compare December 9, 2018 13:36
async def api_patch(self, path, json_data):
headers = {'Content-type': 'application/json'}
result = self._session.request("PATCH", API_BASE_URL + path, headers=headers, json=json_data)
return result.status_code, result.text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the end of file


def fetch_token(self, token_url, client_id, client_secret):
pass

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this code is dead

def __init__(self):
self.status_code = 200
self.text = "test"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, this code is dead

@Rackover Rackover force-pushed the java_api_and_army_result_fix branch from 8fbd41c to 8f1710a Compare December 9, 2018 14:35
@Rackover Rackover force-pushed the java_api_and_army_result_fix branch from 8f1710a to 7770163 Compare December 9, 2018 14:51
@Rackover Rackover merged commit 78f8c22 into FAForever:develop Dec 9, 2018
@Rackover Rackover deleted the java_api_and_army_result_fix branch December 9, 2018 18:51
Rackover added a commit to Rackover/server that referenced this pull request Dec 12, 2018
Rackover added a commit to Rackover/server that referenced this pull request Dec 12, 2018
Rackover added a commit that referenced this pull request Dec 12, 2018
Rebased the following two commits :
* Now uses java api instead of Python API (#370)

* Removed unused DB submodule (#373)
Brutus5000 pushed a commit that referenced this pull request Jun 24, 2019
Rebased the following two commits :
* Now uses java api instead of Python API (#370)

* Removed unused DB submodule (#373)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants