-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create user #2
Open
MartinDelille
wants to merge
22
commits into
master
Choose a base branch
from
1-implement-discourse-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Create user #2
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
527477c
add retrofit with failing import
MartinDelille 1890630
fix import
MartinDelille 92c260f
first compiling draft
MartinDelille efdb8c8
add missing files
MartinDelille bb84a69
test new tutorial
MartinDelille 8b2b479
remove simpleframework dependency
MartinDelille 0099373
fix repository and dependency form retrofit2 converter-gson
MartinDelille a1341ee
fix compilation errors
MartinDelille 9c2df0b
list posts on jsonplaceholder
MartinDelille 8942b1e
using constructor
MartinDelille ae00055
first try with discourse api => 403
MartinDelille e8428ea
try to add okhttp3 as dependency
MartinDelille 4dad678
add import
MartinDelille d27db3a
log request
MartinDelille 26b29fd
fix get user
MartinDelille 0557cc2
create user working
MartinDelille b822b33
add delete user
MartinDelille 10fe78c
remove getUser
MartinDelille 2b0ab39
Fix component initialization
tmortagne b0890bd
Fix MemoryConfigurationSource with Thomas
MartinDelille 7794e90
Pass api key and username in the header
MartinDelille 15e80aa
Rethrow IOException properly
MartinDelille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...scourse/src/main/java/org/xwiki/contrib/usersync/discourse/internal/DiscourseService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.xwiki.contrib.usersync.discourse.internal; | ||
|
||
import java.util.List; | ||
//import org.simpleframework.xml.Path; | ||
import retrofit2.Call; | ||
import retrofit2.http.GET; | ||
|
||
import org.xwiki.contrib.usersync.discourse.internal.Post; | ||
|
||
public interface DiscourseService { | ||
@GET("posts") | ||
Call<List<Post>> getPosts(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...connector-discourse/src/main/java/org/xwiki/contrib/usersync/discourse/internal/Post.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.xwiki.contrib.usersync.discourse.internal; | ||
|
||
import com.google.json.annotation.SerializedName; | ||
|
||
public class Post { | ||
private int userId; | ||
|
||
private int id; | ||
|
||
private String title; | ||
|
||
@SerializedName("body") | ||
private String text; | ||
|
||
public int getUserId() { | ||
return d; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public String getText() { | ||
return text; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il n'y as aucune raison pour que tu ai besoin de ça. Maven central est activé de base dans Maven.