Skip to content

Conversation

oguzkocer
Copy link
Contributor

@oguzkocer oguzkocer commented May 23, 2024

Builds on #107.

Introduces request module moving WPNetworkRequest & WPNetworkResponse types and endpoint module into it. No change has been made besides updating the import statements.

I intend to build on this request module by splitting WPApiHelper type.

@jkmassel @crazytonyli Do you think we should remove the endpoint suffix from the endpoint/users_endpoint.rs & endpoint/plugins_endpoint.rs files? Since these are within the endpoint module, the suffix is probably unnecessary. The only issue is that we'd have multiple users.rs, plugins.rs etc files - although all of them would be under different directories that clearly shows the distinction.

@oguzkocer oguzkocer added the Rust label May 23, 2024
@oguzkocer oguzkocer added this to the 0.1 milestone May 23, 2024
@oguzkocer oguzkocer requested review from crazytonyli and jkmassel May 23, 2024 18:06
Copy link
Contributor

@jkmassel jkmassel left a comment

Choose a reason for hiding this comment

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

Looks fine!

To your question – I prefer that if we have pub struct PluginsEndpoint that the file is named plugins_endpoint.rs, but if it gets annoying we can change it later – I think the canonical argument here is that if you have them all open in the same editor it's easier to see which file is which 😅

Base automatically changed from dont-export-endpoint-module to trunk May 23, 2024 19:20
@oguzkocer oguzkocer enabled auto-merge (squash) May 23, 2024 19:23
@oguzkocer oguzkocer merged commit 58a6a7b into trunk May 23, 2024
@oguzkocer oguzkocer deleted the request-module branch May 23, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants