Retrieving uniswap price

Has anybody successfully used the uniswap contracts to retrieve the price of a token swap?

Example, if you have 10000 DAI and wanted to swap it for USDC, how much USDC would you get?

I’ve been looking at the uniswap router and factory contracts, using getRate and getAmountsOut but I’ve been having trouble piecing it together. I have it all working fine with Kyber though