Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 18 2017 22:49

    gunjandatta on gdatta

    Update README.md Update README.md Update README.md and 2 more (compare)

Andreas Hilken
@hilkenan
i will check on monday
thx a lot
Gunjan Datta
@gunjandatta
Here is the issue in github. Feel free to add an alert, so you'll know the status of it. gunjandatta/sprest#142
Gunjan Datta
@gunjandatta
The issue has been fixed. Please let me know if you have other issues with using this in SPFX projects.
Thanks
Andreas Hilken
@hilkenan
Thx i let you know.
Andreas Hilken
@hilkenan
So i test you fix. and works also in modern pages
But i have another Problem, since i start with you module. with some UserProfile Methods. Eg. with getPropertiesFor. I never get it works. Everytime its was complaining that the used REST Call is invalid.
Do you have an example with this Method? How you get it work?
You'll probably want to explore the other social apis like "PeopleManager"
Gunjan Datta
@gunjandatta
$REST.PeopleManager().getMyProperties().execute(function(myProps) {  })
I don't have the documentation setup for these apis, but library supports them
The library is designed to mirror the actual API, so if you follow Microsoft's documentation, you should be able to figure it out. I'll see if I can build out the documentation this week for these apis
Andreas Hilken
@hilkenan
I try exactly this, but with the getMy... i was working perfectly, but not for the getPropertiesFor. For thos calls i was not able to make it work. I get everytime errors. Then i try to build my own REST Calls. This was working unless i use modern pages. There i got the same Problem (403). So i think i could get my own REST calls working, but i would like it more to use your API for those REST calls
Gunjan Datta
@gunjandatta
I'll do some more investigation and try to get back to you today
Gunjan Datta
@gunjandatta
You're right, it's a bug in the library.
Thankfully, it's an easy one. I just need to modify the mapper file and set the request type for the format of the variables passed in the query string
I'll make an update to the social apis, so if you see any other issues please submit them here or in GitHub and I'll get them fixed asap
Issue created: gunjandatta/sprest#144
Gunjan Datta
@gunjandatta
I've closed the issue out. Get version 3.8.9 of the library, and let me know if you have any other issues w/ the social apis.
Per the issue, I've validated the mapper w/ the formats provided by the MS Documentation
Thank you again for find a bug and reporting it :)
$REST.PeopleManager().getPropertiesFor("[Account Name]").execute(function(props){ console.log(props); })
$REST.PeopleManager().getUserProfilePropertyFor("[Account Name]", "[Property]").execute(function(props){ console.log(props); })
Both of these were tested in a classic and modern page.
Gunjan Datta
@gunjandatta
Added the People Manager page for a reference
Added the Profile Loader page for a reference
Gunjan Datta
@gunjandatta
Added the last page Social Feed.
Andreas Hilken
@hilkenan
Hey!! Thanks. So i can remove my own code parts. This will make my code more cleaner and readable.
Next time I will not try to finde a work arround. Its easier to let you do it 😂😂
Andreas Hilken
@hilkenan
Hey
Thanks that also works now. Now if found somthing else
So the Properties ExtendedReports and ExtendedReports should return a string, but its return a Object with a results as array and in it i get my EMails from my Managers or Reporters. But.....
i found a work arraound:
             let innerObject = profile.ExtendedManagers as Object;
            if (innerObject) {
                let result = innerObject["results"] as Array<string>;
                let accounts:string[];
                accounts = result;
So this works but i not think that its what you expect.
Bether would be an string[] that direct has all Account Names in it
Also the Property UserProfileProperties is not correct filles, and i think also not correct defined. I think it should be an array of KeyValue insted only KeyValue I also found there a work arround
So would be nice when you could take a look also at those issus
Gunjan Datta
@gunjandatta
Glad it's helping :)
I'll update the IntelliSense for this
Gunjan Datta
@gunjandatta
Thanks for finding this stuff. These are really simple to update, since it's all related to the IntelliSense. I've done my best to take care of most of the library, but haven't been able to keep up with all of it.
I took care of the "Peers" property too. It's supposed to be an array of strings too.
Get the latest (v3.9.0) and the IntelliSense should be updated for you.
Andreas Hilken
@hilkenan
Thx
Andreas Hilken
@hilkenan
Works perfect. Thx
Gunjan Datta
@gunjandatta
@hilkenan Awesome. Let me know if there are any other issues. I do plan on adding the graph api to the library in the near future.
Andreas Hilken
@hilkenan
Sounds greate! This api is realy big!
Gunjan Datta
@gunjandatta
@hilkenan big as in size of the output files (381kb uncompressed or 141kb minified)?
Andreas Hilken
@hilkenan
No in case of functiinality
Gunjan Datta
@gunjandatta
:smile: Ok. I've actually been trying to reduce the size, but as a low priority. There is a lot to be documented still, but the intellisense is built out to hopefully be enough for the developer to know what's in the library. Let me know if there is other stuff that is unclear, so I can address it via documentation. Thanks