Code Monkey home page Code Monkey logo

enjin-csharp-sdk's People

Contributors

bishopjohnson avatar bradez avatar favorlock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

enjin-csharp-sdk's Issues

No Reference for Builder() in ProjectClient class

So the 'Quick Start' guide has:
ProjectClient client = ProjectClient.Builder().BaseUri(EnjinHosts.KOVAN).Build();
For me at least, I'm getting an error that Project Client does not contain a definition for Builder()

README.md doesn't exist?

This sounds weird but when I just clone without adding anything and build
it says I don't have README.md? Following is the exact message.

NU5039 The readme file 'README.md' does not exist in the package.

Bug with DeletePlayer

As per the error below the DeletePlayer method says it returns a bool but it looks like it infact returns a null and that then can not be converted to a boolean.

crit: Enjin-SDK[0]
      An error occured while processing a request or a response.
      System.ArgumentException: Can not convert Null to Boolean.
         at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
         at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
         at Newtonsoft.Json.Linq.JToken.ToObject[T]()
         at Enjin.SDK.Graphql.GraphqlData`1.ProcessJsonResult(JToken result)
         at lambda_method96(Closure , Object[] )
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
         at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
         at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
         at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
         at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
         at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
         at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
         at Enjin.SDK.BaseSchema.<SendRequest>b__12_0[T](Task`1 task)

Syntax Error: Unexpected <EOF> when trying to get access token

I added my project on Jumpnet. UUID : 7577d864-9b88-443c-8897-8d3e941dfb9c

I can use the GraphQL Playground just fine to make a call to https://jumpnet.cloud.enjin.io/graphql/project,
passing in the UUID and secret, and getting back the access token.

But when I do the same using the C# SDK, I get the following error...
Syntax Error: Unexpected

ProjectClient client = new ProjectClient(EnjinHosts.JUMP_NET);
            
            AuthProject project = new AuthProject()
                .Uuid("7577d864-9b88-443c-8897-8d3e941dfb9c")
                .Secret("xxxxx");

            GraphqlResponse<AccessToken> res = client.AuthProject(project).Result;

Any ideas?

Event streams

Firstly i wanted to say that they look extreamly useful but i see one main issue with them. If you build your application to rely on them then you need to be able to deal with the case when the reader crashes or looses connection and needs to resume. If not you would need to ge thte state of everything when you restart the app or process. To me it seems like it could be ideal to be able to specify the events you are interested in from a block going forward or something like that and you have the events report the block so you can keep track of where you are up to and resume from there once connection is back or your app is back up again.

If developers could do something like that then i could see a lot of the API calls not being needed for queries and managing local state that is in sync with the blockchain would be a lot easier.

Imported in Unity Broken Project Missing Libraries

We get all errors on importing the Project inside Unity. PusherClient is not defined and many more, could you please fix it ? It would be useful if you create a proper Unity doc/SDK since it's the number one game engine out there! Thanks!

image

Authentication

I am only starting to play with the library so i may have missed something but the auth workflow feels a little wrong to me. When we authenticate a project or a player Enjin returns a JWT token that is valid for 24 hours and then i beleive you need to renew it using the original authentication method as i assume you can't refresh the token using the token. For a short running program this is not an issue but for a server side program that may run for days, weeks or months it would be.bFrom what i can tell the clients don't really have anything in there to manage this or help with this and instead the developer needs to code it all and i would think it would be common task for almost anyone using the lib.

Perhaps you could have an Authentication Helper or something that could optionally be passed to the clients when created that could do the token management and refresh for the client by taking in the AuthProject UUID and Secret from config or some other source like a secret store. If the project auth is going to expire in say 30 minutes it will create a project client and get a new auth token to be used by all project clients that use the AuthHelper. For the playerClient i think it is a little more complex as as to refresh those you need the project aith token and the player details but the authhelper could provide the project token needed and i would think the player details would be in the player token since they are jwt tokens.

honestly i have not quite understood yet when you would use the player access token vs just using the access token for the project as it seems like you cna do most things if not all on the project in relation to the players. I get the reason froma security side of things but if their tokens expire then you still need to project level auth token to keep getting the players tokens so does not really let you seperate things out unless you do it at login one time or something as normally a user should be online for less than 24 hours

GetWallet missing balances

The result object for GetWallet does not have balances property. I can't workout how to see the NFT's on an ethAddress the same as the graphql below returns in the playground.

query {
GetWallet(ethAddress: "0x854Cd273c80eF85C3e674B0637AB067b962744F2") {
ethAddress
enjAllowance
enjBalance
ethBalance
balances {
asset{name}
id
index
value
project {
name
}
}
assetsCreated {
id
items {
name
id
}
}
}
}

Query is not being compiled in CreateRequestBody method

I'm currently trying this out in unity and I notice that the query variable within the CreateRequestBody method that's located in the BaseSchema.cs file is not compiling the query, but the variables variable is generating the input properly.

On a side note: Base on what I have gathered so far, I wouldn't be able to really do anything anyways assuming that most of the current GraphQL are for the early access api correct (i.e. AuthProject is an early access GraphQL query)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.